Array ( [ABRF] => Array ( [MS06-007] => Array ( [0] => 1 ) [MS06-008] => Array ( [0] => 1 ) [MS06-001] => Array ( [0] => 0 ) )
[ADRF] => Array ( [MS06-001] => Array ( [0] => 1 ) [MS06-007] => Array ( [0] => 1 ) [MS06-008] => Array ( [0] => 1 ) )
Notice that in the 1st row it goes ABRF, MS06-007,MS06-008,MS06-001
and the 2nd row it is -------------- ADRF, MS06-001,MS06-007,MS06-008
I need every record to be sorted in the same order as the second result.
Here is what I currently have been trying:
Code: Select all
foreach ($site_array as $site_key => $site_val)
{
foreach ($site_val as $site_name => $site_data)
{
ksort($site_name);
echo "$site_val------$site_key--------$site_name<br>";
} //2nd dimension
} // 1st dimension