title: php json_encode mysql result
body: <p>I have a simple <code>mysql_query</code> and I would like to encode the <code>results(title= &gt; $title, price =&gt; $price etc)</code> in json . </p>
  
  <pre>
  $sql = mysql_query("SELECT * FROM item_details WHERE posting_id='$item_number'");
  
   while($row = mysql_fetch_array($sql))
  {
     $title = base64_decode($row['title']);
     $price = $row['price'];
     $seller_user = $row['user'];
  }
  </pre>