About
Pricing
Community
Teams
Start Free Trial
Log in
rgb192
asked on
9/2/2010
want to loop foreach number in a list
i have a list of numbers 'numbers'
56
46
57
89
76
foreach (numbers as $n){
echo $n;
do something
}
PHP
4
1
Last Comment
rgb192
8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Chris Stanyon
9/2/2010
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Ray Paseur
9/2/2010
foreach() is a control structure, documented on the PHP web page here. It operates on arrays and objects, not lists. Please show us how your list of numbers is organized.
http://us2.php.net/manual/en/control-structures.foreach.php
rgb192
9/6/2010
ASKER
56
46
57
89
76
these are the numbers
I want to copy paste the numbers into the php code
rgb192
9/6/2010
ASKER
yes, this answered my question
thank you
Your help has saved me hundreds of hours of internet surfing.
fblack61
http://us2.php.net/manual/en/control-structures.foreach.php