title: How can I get data from PHP to Android TextView?
body: <p>How can I get data from PHP to Android?</p>
  
  <p>can you help me?, how can I display result of PHP to android textview this is my PHP code I should use JSON on this...</p>
  
  <pre><code>&lt;? php
  mysql_connect("localhost","root","");
  
  mysql_select_db("mydatabase");
  
  $query = "SELECT SUM(OrderPrice) as total FROM tbl_user";
  $result = mysql_query($query);
  
  
  while($row = mysql_fetch_assoc($result))
  {
  $new_arr[] = $row['total'];
  }
  echo json_encode($new_arr);
  
  ?&gt;
  </code></pre>