Avatar of rgb192
rgb192
Flag for United States of America asked on

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

Avatar of undefined
Last Comment
rgb192

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Chris Stanyon

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

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

ASKER
56
46
57
89
76

these are the numbers
I want to copy paste the numbers into the php code
rgb192

ASKER
yes,  this answered my question

thank you
Your help has saved me hundreds of hours of internet surfing.
fblack61