Ajouter de la pagination à mon composant
Bonjour je viens de developper un composant pour joomla 1.5 et je suis bloqué.
Je voudrais inserer une pagination apres 30 lignes de tableau.
Voici mon code :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| $json = implode('', file("https://www.googleapis.com/webfonts/v1/webfonts?key=AIzaSyAGibNz6Zh-x7fvvitFbWO_et8kjOMJgW4"));
$data = json_decode($json,true);
$items = $data['items'];
$i = 0;
echo '<div class="tab"><table border=1 width=800px>
<tr><th>ID</th><th>Description</th><th>Activation</th></tr>';
foreach ($items as $item) {
$str = $item['family'];
$sql0 = "INSERT INTO google_font (id,description) VALUES ('','$str')";
$requete0 = mysql_query($sql0, $cnx) or die( mysql_error() );
echo '<tr><td>1</td><td>Lorem ipsum</td><td width=30><center><input type="checkbox"></center></tr>';
}
echo '</table></div>'; |
Donc ce code m'affiche un tableau qui est tres looong :roll: Je voudrais faire une pagination au bout de 30lignes de tableau