tjmbc Posted June 2, 2008 Share Posted June 2, 2008 i have an array that I used explode() on to break it up into variables i can echo each variable by calling it with $variable[0] then $variable[1] but how do I print all of the variables without calling each one individually? i'm guessing its something like while(???some sort of code to that i don't know???) { echo $variable; } Link to comment https://forums.phpfreaks.com/topic/108305-printing-everything-in-an-explode/ Share on other sites More sharing options...
trq Posted June 2, 2008 Share Posted June 2, 2008 <?php $arr = array('foo','bar','bob'); foreach ($arr as $k) { echo $k."\n"; } ?> Link to comment https://forums.phpfreaks.com/topic/108305-printing-everything-in-an-explode/#findComment-555266 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.