PHP Knowledge Base
fetchAll
NOTE
From the PHP Manual: "Fetches the remaining rows from a result set."
Basically, you get an array that you can loop through using foreach.
mine/university/reference_material/search/journal_article/index.php is an example but timeline file also references a template.
php
$data = $stmt->fetchAll();
foreach ($data as $row) {
echo $row['locations'] . "<br>";
}