Maximum value in while command

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

Post Reply
dominod
Forum Commoner
Posts: 75
Joined: Wed Jun 30, 2010 7:18 am

Maximum value in while command

Post by dominod »

Hi

I want to display all tables in a while loop.

Code: Select all

$id=0;
while($id<=7)
  {
  echo "The name is " . $name[$id] . " and the URL is " . $url[$id] . "<br />";
  $id++;
  }
Where it sais "=7" I want the number to be maximum value. Meaning that if I have 7 rows it will say 7 and if I add 3 new rows it will automatically increase to 10..

How can I do this?

Thanks in advance :)
dominod
Forum Commoner
Posts: 75
Joined: Wed Jun 30, 2010 7:18 am

Re: Maximum value in while command

Post by dominod »

I figured this out :)
Post Reply