Only display latest 10 articles on index page.
This commit is contained in:
parent
d00db792a9
commit
4fea12e8cc
@ -119,8 +119,8 @@
|
|||||||
<th>Temps</th>
|
<th>Temps</th>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
foreach($data as $trajet) {
|
for($i = count($data) - 1; $i > max(count($data) - 11, 0); $i--) {
|
||||||
echo "<tr><td>".htmlspecialchars($liste_stations[$trajet['start']]['name'])."</td><td>".htmlspecialchars($liste_stations[$trajet['end']]['name'])."</td><td>".(int) $trajet['min']."min ".(int) $trajet['sec']."s</td></tr>";
|
echo "<tr><td>".htmlspecialchars($liste_stations[$data[$i]['start']]['name'])."</td><td>".htmlspecialchars($liste_stations[$data[$i]['end']]['name'])."</td><td>".(int) $data[$i]['min']."min ".(int) $data[$i]['sec']."s</td></tr>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
|
Loading…
Reference in New Issue
Block a user