Howdy_McGee Posted June 8, 2011 Share Posted June 8, 2011 Wasn't quite sure where to post this but here it is. I was reading about arrays and it had briefly mentioned list() and each() but I wasn't quite sure what they did or where I would actually implement them in a real world situation. Can anyone go into more detail of what they actually do/why I would want to use these functions? I read more about them on php.net but it didn't really clear any of my confusions. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/238821-list-and-each/ Share on other sites More sharing options...
fugix Posted June 8, 2011 Share Posted June 8, 2011 if you read the php manual on them, then you know what they generally do. What are the specific things that you do not understand about each function? Quote Link to comment https://forums.phpfreaks.com/topic/238821-list-and-each/#findComment-1227140 Share on other sites More sharing options...
spiderwell Posted June 8, 2011 Share Posted June 8, 2011 list can be used in conjunction with explode quite nicely to place results into seperate variables rather than arrays. or they also work well with recordsets as shown in the php.net page under list() <?php $mything = "12-06-2011";//english date as I'm from UK list($day,$month,$year) = explode("-",$mything); ?> way I see it, if you know what they do, and can't find a use for it, you probably don't need it, its not something I use. Quote Link to comment https://forums.phpfreaks.com/topic/238821-list-and-each/#findComment-1227156 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.