title: encoding/decoding textarea value using rawurlencode/rawurldecode
body: <p>When encoding newline of textarea before storing into mysql using PHP with <code>rawurlencode</code> function encodes newline as <code>%0D%0A</code>.</p>
  
  <p>For Example:
  textarea text entered by user:</p>
  
  <pre><code>a
  b
  </code></pre>
  
  <p>encoding using rawurlencode and store into database will store value as <code>a%0D%0Ab</code></p>
  
  <p>When retrieving from database and decoding using <code>rawurldecode</code> does not work and code gives error. How to overcome this situation and what is the best way to store and retrieve and display textarea values.</p>