Skip to content

Instantly share code, notes, and snippets.

@dkarandana
Last active December 18, 2018 14:18
Show Gist options
  • Save dkarandana/e7d4725412f9f0d5b9ebcae5a7e785f5 to your computer and use it in GitHub Desktop.
Save dkarandana/e7d4725412f9f0d5b9ebcae5a7e785f5 to your computer and use it in GitHub Desktop.
/******************************************
Hold Multiple Records as an Array[]
*******************************************
while ($movie = $results->fetch_assoc()) {
$classes = ( ++$row % 2 == 0 ) ? 'even' : 'odd';
$movieRecords .= <<<TABLE
<tr class="{$classes}">
<td><img src="{$movie['thumbnail']}" alt="{$movie['name']}"</td>
<td>{$movie['name']}</td>
<td>{$movie['intro']}</td>
<td>{$movie['votes']}</td>
<td>{$movie['ratings']}</td>
</tr>
TABLE;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment