The query below is listing the results twice. It should give the results like this: John Smith 35 Instead its giving: John John Smith Smith 35 35 Any ideas? <?php $conn=mysql_connect ("localhost", "xxxxx", "xxxxx") or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ('xxxxx', $conn); $result=mysql_query("SELECT * FROM xxxxx"); while ($data=mysql_fetch_array($result)) { foreach ($data as $field) echo "$field <br>"; } mysql_close($conn); ?>