Dave M G a écrit :
PHP List,
Pretty standard.
But what do I do when I want to do the same kind of while loop not
with a MySQL result, but with just a regular array?
while (variable = ????($array)){
echo $variable[text1];
echo $variable[text2];
}
did you try something like this ?
foreach ($array as $variable)
{ echo $variable;
}
or for "associative array"
foreach ($array as $key => $value)
{ echo $key." ".$value;
}
I've been up and down the manual, and looked at foreach statements and
functions like each(), but I can't seem to zero in on what I need.
Can anyone let me know what it is I'm missing?
Thank you for any advice.
hope this'll help
N F
--
Dave M G
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php