Numbers in guestbook

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

PAW Projects
Forum Commoner
Posts: 30
Joined: Tue Jun 15, 2004 7:43 am
Contact:

Post by PAW Projects »

I think he's looking for something like this:

Code: Select all

// assuming you have this function, for post clarity.
$entries = $db->guestbook_entries_fetch();

// looping through the entries, counting 1, 2, 3, 4, .. while ignoring the row ID
for ($i=0; $i<count($entries); $i++) {
echo 'This is entry number '.$i.'<br />';
echo $entries[$i]->text;
}
Post Reply