Page 1 of 1

Maximum value in while command

Posted: Fri Jul 02, 2010 7:50 am
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 :)

Re: Maximum value in while command

Posted: Fri Jul 02, 2010 8:07 am
by dominod
I figured this out :)