7
I would like to know how I can make a PHP pagination (in this case, 10 items per page).
The exhibition is being made this way:
<?php foreach($pdo->query('SELECT * FROM videos ORDER BY id DESC') as $c): ?>
<li>
<p>
<strong>
<?php echo $c['title'];?>
</strong>
</p>
<a title="<?php echo $c['title'] ?>" class="lightbox" href="http://www.youtube.com/embed/<?php echo $c['video_ed'] ?>?rel=0&wmode=transparent">
<img src="http://i1.ytimg.com/vi/<?php echo $c['video_ed'] ?>/default.jpg" alt="<?php echo $c['title']; ?>" />
</a>
</li>
<?php endforeach; ?>
I haven’t been able to find a method that works...
See the answer here : http://answall.com/questions/26303/como-fazer-pagina%C3%A7%C3%A3o-php-e-mysql
– Edilson