title: How to Fetch Multiple rows from PHPMYADMIN using PHP Code
body: <p>I have multiple record(s) in <strong>PHPMYADMIN</strong> and now i am trying to fetch those record(s) using PHP Code, but always i am getting  <strong>Array ( ) 1</strong> whenever i run my php script using <strong>Localhost</strong>, however i have <strong>5 rows</strong> in table.</p>
  
  <p>Please see below code:</p>
  
  <pre><code>&lt;?php
  $objConnect = mysql_connect("localhost","root","");
  $objDB = mysql_select_db("mydatabase");
  
  $strMemberID = $_POST["sMemberID"];
  $strSQL =  "SELECT * FROM order_details WHERE 
  MemberID = '".mysql_real_escape_string($strMemberID)."' ORDER BY OrderID DESC ";
  
  $objQuery = mysql_query($strSQL);
  
  
  while($obResult = mysql_fetch_assoc($objQuery))
  {
  $arr = array();  
  $arr["OrderID"] = $obResult["OrderID"];
  $arr["ItemDetails"] = $obResult["ItemDetails"];
  }
  mysql_close($objConnect);   
  echo print_r($arr); 
  ?&gt;
  </code></pre>