Jump to content

looping


HAN!

Recommended Posts

you wouldn't use $i

a better option would be

<?php
foreach($_POST as $copy)
{
//$copy will loop throught the values
}
?>

 

if you must use a while..

you could do something like this

<?php
$i++;
$copy= current($_POST);
while($i<$num)
{
$first=mysql_result($result,$i,"First Name");
echo $copy;

//At the end
$copy= next($_POST);
}
?>

Link to comment
https://forums.phpfreaks.com/topic/74715-looping/#findComment-377719
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.