I am trying to return a basic list from a table in PHP but for some reason it returns the results in one long string instead of displaying the next record on a new line. I have done something similar a while ago but I don't use PHP that often so I'm guessing I am missing a fairly obvious mistake. Any help is appreciated.
My current code looks like this.
<?php
require_once("dbconnect.php");
$query = "SELECT * FROM clients";
$dbRecords = mysql_query($query, $dbConnect)
or die("Problem reading table: " + mysql_error());
$clientName = $dbRecords["clientName"];
while ($arrRecords = mysql_fetch_array($dbRecords))
{
$clientName .= $arrRecords["clientName"];
}
?>
<div>
<?php
echo '<h2>Client List</h2>';
echo $clientName; echo'<br />'; echo'<br />';
?>
</div>