danjapro Posted April 2, 2012 Share Posted April 2, 2012 I need to return each number from 1 - 10000 individually to out each number as part of url to build the link. How to write out the the foreach syntax, please help $thumbnails = implode($thumbnails, range(1, 10000)); Link to comment https://forums.phpfreaks.com/topic/260214-how-to-write-a-foreach-on-this-implode/ Share on other sites More sharing options...
cpd Posted April 2, 2012 Share Posted April 2, 2012 Your code will create a massive string assigned to the $thumbnails variable. You can't cycle through a string with a foreach statement. I think what your talking about, I think... foreach(range(1,10000) as $int){ // DO SOMETHING } Link to comment https://forums.phpfreaks.com/topic/260214-how-to-write-a-foreach-on-this-implode/#findComment-1333727 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.