JREAM Posted January 12, 2009 Share Posted January 12, 2009 I am printing out an array with html code in it with: print_r($set); I would like to remove the array keys and Array text, should I use str_replace and make a formula for the key value, or is there an easier way? Link to comment https://forums.phpfreaks.com/topic/140483-can-you-do-print_r-and-remove-the-1/ Share on other sites More sharing options...
Mchl Posted January 12, 2009 Share Posted January 12, 2009 foreach ($set AS $value) { echo $value."<br/>\n"; } Link to comment https://forums.phpfreaks.com/topic/140483-can-you-do-print_r-and-remove-the-1/#findComment-735158 Share on other sites More sharing options...
JREAM Posted January 12, 2009 Author Share Posted January 12, 2009 Thanks, I had done this: for ($j = 0; $j < count($set); $j++) { print $set[$j]; } Link to comment https://forums.phpfreaks.com/topic/140483-can-you-do-print_r-and-remove-the-1/#findComment-735162 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.