title: Showing PHP in a PhoneGap based App
body: <p>I'm trying to show the results of the php in my app, when I test it outside of the app, it works fine, and I have tried many solutions out there to load it with js, ajax, etc. but can't get it to work. Any ideas?</p>
  
  <p>The php gets data from MySql database</p>
  
  <p><b>-----select.php------</b></p>
  
  <pre><code>&lt;?php
  $con=mysqli_connect("localhost","localhost","","test");
  // Check connection
  if (mysqli_connect_errno())
  {
      echo "Failed to connect to MySQL: " . mysqli_connect_error();
  }
  
  $result = mysqli_query($con,"SELECT * FROM Persons");
  
  /*while($row = mysqli_fetch_array($result))
  {
      echo $row['FirstName'] . " " . $row['LastName'];
      echo "&lt;br /&gt;";
  }*/
  
  echo "&lt;table border='1'&gt;
  &lt;tr&gt;
  &lt;th&gt;Firstname&lt;/th&gt;
  &lt;th&gt;Lastname&lt;/th&gt;
  &lt;th&gt;Age&lt;/th&gt;
  &lt;/tr&gt;";
  
  while($row = mysqli_fetch_array($result))
  {
      echo "&lt;tr&gt;";
      echo "&lt;td&gt;" . $row['FirstName'] . "&lt;/td&gt;";
      echo "&lt;td&gt;" . $row['LastName'] . "&lt;/td&gt;";
      echo "&lt;td&gt;" . $row['Age'] . "&lt;/td&gt;";
      echo "&lt;/tr&gt;";
  }
  
  echo "&lt;/table&gt;";
  mysqli_close($con);
  ?&gt;
  </code></pre>