php - Multiple Foreach loops for one array -
i have foreach loops array called $feedsmerged. have foreach loop near top of document , it's setting global variables array.
i'd recall foreach loop, or run again on array , time build elements variables set above.
top of document.
foreach ($feedsmerged $posts) { $post_id = $post['post_id']; etc etc }
then bottom of page
foreach ($feedsmerged $posts) { echo '<div class="' . $post_id . '">stuff</div>'; }
is possible do? reason using 2 foreach loops on same array i'd keep organized , i'll have content in between each foreach can't in foreach
no problem @ all. can access array many times using supported method in script.
Comments
Post a Comment