Jump to content

testing my foreach code


Monkuar

Recommended Posts

these are sections of my profile, just plain right now so easier for u to read:

 

$notes = 'notes';
$signature = 'signatures';
$friends = 'friends';
$middle=array ( "0"  => array ( "section" => $notes,
                                "hide" => "0",
                                       "c" => "apple"
                                     ),
                  "1" => array ("section" => $signature,
                                "hide" => "0",
                                       "c" => "apple"
                                     ),


                  "2"   => array ("section" => $friends,
                                  "hide" => "0",
                                       "c" => "apple"
                                     ),
                );

$order = array(2,1,0);
foreach ($order as $index)
{
  echo '<br>'.$middle[$index]['section'];
}

 

If the hide = 1 how do i hide a array in my foreach?

Link to comment
https://forums.phpfreaks.com/topic/258428-testing-my-foreach-code/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.