Jump to content

Maximum value in while command


dominod

Recommended Posts

Hi

 

I want to display all tables in a while loop.

 

$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 :)

 

Link to comment
https://forums.phpfreaks.com/topic/206514-maximum-value-in-while-command/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.