| Twiebie |
|
|---|---|
|
On line 2 you've put the first row in $row and then you started looping through the result. Use fetchAll() like so:
$sql = $db->query("SELECT * FROM cot_test ORDER BY test_title ASC");
foreach ($sql->fetchAll() as $row)
{
echo $row['test_title'];
echo "<br>";
}
|