I would like to know how I can perform pagination in PHP (in this case 10 items per page).
The display 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/<?phpecho$c['video_ed']?>/default.jpg" alt="<?php echo $c['title']; ?>" />
</a>
</li>
<?php endforeach; ?>
I have not yet been able to find a method that works ...