Witam.
Z góry powiem że na PHP ani MySQL nie znam się wcale dlatego zakładam temat. Chce zmienić w kodzie jedną prostą tak mi się wydaje rzecz. Ale nie mam pojęcia jak a szukanie po internecie nie pomogło. Już przedstawiam problem. Mam taki kod.
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?>
<div class="list">
<div class="title">
<a href="
<?php echo site_url
('latest/') ?>">
<?php echo _
('Latest released chapters')?>:</a>
</div>
<?php
$current_comic = "";
$current_comic_closer = "";
$opendiv = FALSE;
// Let's loop over every chapter. The array is just $chapters because we used get_iterated(), else it would be $chapters->all
foreach($chapters as $key => $chapter)
{
if ($current_comic != $chapter->comic_id)
{
if ($opendiv) {
}
echo '<div class="group">'; if($chapter->comic->get_thumb()) echo '<a href="'.$chapter->comic->href().'"><img class="preview" src="'.$chapter->comic->get_thumb().'" /></a>'; echo '<div class="title">'.$chapter->comic->url().'</div>'; $current_comic = $chapter->comic_id;
}
echo '<div class="element">'.$chapter->download_url(NULL, 'fleft small').' <div class="title">'.$chapter->url().'</div>
<div class="meta_r">' . _('by') . ' ' . $chapter->team_url() . ', ' . $chapter->date() . ' ' . $chapter->edit_url() . '</div>
</div>';
$opendiv = TRUE;
}
// Closing the last comic group
echo prevnext
('latest/', $chapters); ?>
</div>
Chce aby mi wyświetlało tylko 3 elementy na stronie. Teraz wyświetla się 25. Czy jakaś dobra duszyczka nie pomoże szybko rozwiązać tego problemu?