oskare100 Posted April 16, 2007 Share Posted April 16, 2007 Hello, I'm trying to get this code to work: $item_number="5161516161,784684664864684"; $item_numbers = explode(",", $item_number); foreach ($item_numbers as &$item_number) { echo "$item_number"; ) I need it to split the 5161516161,784684664864684 and run " echo "$item_number"; " twice, one for each item number. So if $item_number="5161516161,784684664864684,15515151"; then the script is supposed to run " echo "$item_number"; " three times, one time for each item number. Please help, how can I do that? What is wrong with my code/how should it be? /Oskar Quote Link to comment Share on other sites More sharing options...
per1os Posted April 16, 2007 Share Posted April 16, 2007 $item_number="5161516161,784684664864684"; $item_numbers = explode(",", $item_number); foreach ($item_numbers as $item_num) { echo "$item_num"; } Should work like a champ. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.