laural4705 Posted September 9, 2015 Share Posted September 9, 2015 I posted in another thread when I was trying to figure out how to make my menu (below) work correctly. I finally got the menu figured out and it works very nicely. The last piece of the puzzle I need is to learn how to sort by a value within the array. I would like to sort the menu items by the field 'id' - ksort just sorts by the id of the array. Can anyone show me how to change my code below so that it will sort correctly? I need a little explanation as I have done a lot of reading and have made an attempt to change my existing code to sort differently, but I keep breaking it! Any insight would be greatly appreciated!!! $menu = array( array( 'id' => 'd00', 'name' => $_SESSION['home'], 'divid' => 'd00', 'modid' => 'm000', 'parent' => '', ), array( 'id' => $_SESSION['id_d01_slot'], 'name' => $_SESSION[$_SESSION['id_d01']], 'divid' => $_SESSION['id_d01_slot'], 'modid' => 'm000', 'parent' => '', ), array ( 'id' => $_SESSION['id_d02_slot'], 'name' => $_SESSION[$_SESSION['id_d02']], 'divid' => $_SESSION['id_d02_slot'], 'modid' => 'm000', 'parent' => '', ), array ( 'id' => $_SESSION['id_d03_slot'], 'name' => $_SESSION[$_SESSION['id_d03']], 'divid' => $_SESSION['id_d03_slot'], 'modid' => 'm000', 'parent' => '', ), array ( 'id' => $_SESSION['id_d04_slot'], 'name' => $_SESSION[$_SESSION['id_d04']], 'divid' => $_SESSION['id_d04_slot'], 'modid' => 'm000', 'parent' => '', ), array ( 'id' => $_SESSION['id_d05_slot'], 'name' => $_SESSION[$_SESSION['id_d05']], 'divid' => $_SESSION['id_d05_slot'], 'modid' => 'm000', 'parent' => '', ), array ( 'id' => $_SESSION['id_d06_slot'], 'name' => $_SESSION[$_SESSION['id_d06']], 'divid' => $_SESSION['id_d06_slot'], 'modid' => 'm000', 'parent' => '', ), array ( 'id' => $_SESSION['id_d07_slot'], 'name' => $_SESSION[$_SESSION['id_d07']], 'divid' => $_SESSION['id_d07_slot'], 'modid' => 'm000', 'parent' => '', ), array ( 'id' => $_SESSION['id_d08_slot'], 'name' => $_SESSION[$_SESSION['id_d08']], 'divid' => $_SESSION['id_d08_slot'], 'modid' => 'm000', 'parent' => '', ), array ( 'id' => $_SESSION['id_d09_slot'], 'name' => $_SESSION[$_SESSION['id_d09']], 'divid' => $_SESSION['id_d09_slot'], 'modid' => 'm000', 'parent' => '', ), array ( 'id' => $_SESSION['id_d10_slot'], 'name' => $_SESSION[$_SESSION['id_d10']], 'divid' => $_SESSION['id_d10_slot'], 'modid' => 'm000', 'parent' => '', ), array ( 'id' => $_SESSION['id_m001_slot'], 'name' => $_SESSION[$_SESSION['id_m001_slot']], 'divid' => $_SESSION['id_m_d_m001'], 'modid' => $_SESSION['id_m001_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m001']], ), array ( 'id' => $_SESSION['id_m002_slot'], 'name' => $_SESSION[$_SESSION['id_m002_slot']], 'divid' => $_SESSION['id_m_d_m002'], 'modid' => $_SESSION['id_m002_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m002']], ), array ( 'id' => $_SESSION['id_m003_slot'], 'name' => $_SESSION[$_SESSION['id_m003_slot']], 'divid' => $_SESSION['id_m_d_m003'], 'modid' => $_SESSION['id_m003_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m003']], ), array ( 'id' => $_SESSION['id_m004_slot'], 'name' => $_SESSION[$_SESSION['id_m004_slot']], 'divid' => $_SESSION['id_m_d_m004'], 'modid' => $_SESSION['id_m004_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m004']], ), array ( 'id' => $_SESSION['id_m005_slot'], 'name' => $_SESSION[$_SESSION['id_m005_slot']], 'divid' => $_SESSION['id_m_d_m005'], 'modid' => $_SESSION['id_m005_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m005']], ), array ( 'id' => $_SESSION['id_m006_slot'], 'name' => $_SESSION[$_SESSION['id_m006_slot']], 'divid' => $_SESSION['id_m_d_m006'], 'modid' => $_SESSION['id_m006_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m006']], ), array ( 'id' => $_SESSION['id_m007_slot'], 'name' => $_SESSION[$_SESSION['id_m007_slot']], 'divid' => $_SESSION['id_m_d_m007'], 'modid' => $_SESSION['id_m007_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m007']], ), array ( 'id' => $_SESSION['id_m008_slot'], 'name' => $_SESSION[$_SESSION['id_m008_slot']], 'divid' => $_SESSION['id_m_d_m008'], 'modid' => $_SESSION['id_m008_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m008']], ), array ( 'id' => $_SESSION['id_m009_slot'], 'name' => $_SESSION[$_SESSION['id_m009_slot']], 'divid' => $_SESSION['id_m_d_m009'], 'modid' => $_SESSION['id_m009_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m009']], ), array ( 'id' => $_SESSION['id_m010_slot'], 'name' => $_SESSION[$_SESSION['id_m010_slot']], 'divid' => $_SESSION['id_m_d_m010'], 'modid' => $_SESSION['id_m010_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m010']], ), array ( 'id' => $_SESSION['id_m011_slot'], 'name' => $_SESSION[$_SESSION['id_m011_slot']], 'divid' => $_SESSION['id_m_d_m011'], 'modid' => $_SESSION['id_m011_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m011']], ), array ( 'id' => $_SESSION['id_m012_slot'], 'name' => $_SESSION[$_SESSION['id_m012_slot']], 'divid' => $_SESSION['id_m_d_m012'], 'modid' => $_SESSION['id_m012_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m012']], ), array ( 'id' => $_SESSION['id_m013_slot'], 'name' => $_SESSION[$_SESSION['id_m013_slot']], 'divid' => $_SESSION['id_m_d_m013'], 'modid' => $_SESSION['id_m013_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m013']], ), array ( 'id' => $_SESSION['id_m014_slot'], 'name' => $_SESSION[$_SESSION['id_m014_slot']], 'divid' => $_SESSION['id_m_d_m014'], 'modid' => $_SESSION['id_m014_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m014']], ), array ( 'id' => $_SESSION['id_m015_slot'], 'name' => $_SESSION[$_SESSION['id_m015_slot']], 'divid' => $_SESSION['id_m_d_m015'], 'modid' => $_SESSION['id_m015_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m015']], ), array ( 'id' => $_SESSION['id_m016_slot'], 'name' => $_SESSION[$_SESSION['id_m016_slot']], 'divid' => $_SESSION['id_m_d_m016'], 'modid' => $_SESSION['id_m016_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m016']], ), array ( 'id' => $_SESSION['id_m017_slot'], 'name' => $_SESSION[$_SESSION['id_m017_slot']], 'divid' => $_SESSION['id_m_d_m017'], 'modid' => $_SESSION['id_m017_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m017']], ), array ( 'id' => $_SESSION['id_m018_slot'], 'name' => $_SESSION[$_SESSION['id_m018_slot']], 'divid' => $_SESSION['id_m_d_m018'], 'modid' => $_SESSION['id_m018_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m018']], ), array ( 'id' => $_SESSION['id_m019_slot'], 'name' => $_SESSION[$_SESSION['id_m019_slot']], 'divid' => $_SESSION['id_m_d_m019'], 'modid' => $_SESSION['id_m019_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m019']], ), array ( 'id' => $_SESSION['id_m020_slot'], 'name' => $_SESSION[$_SESSION['id_m020_slot']], 'divid' => $_SESSION['id_m_d_m020'], 'modid' => $_SESSION['id_m020_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m020']], ), array ( 'id' => $_SESSION['id_m021_slot'], 'name' => $_SESSION[$_SESSION['id_m021_slot']], 'divid' => $_SESSION['id_m_d_m021'], 'modid' => $_SESSION['id_m021_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m021']], ), array ( 'id' => $_SESSION['id_m022_slot'], 'name' => $_SESSION[$_SESSION['id_m022_slot']], 'divid' => $_SESSION['id_m_d_m022'], 'modid' => $_SESSION['id_m022_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m022']], ), array ( 'id' => $_SESSION['id_m023_slot'], 'name' => $_SESSION[$_SESSION['id_m023_slot']], 'divid' => $_SESSION['id_m_d_m023'], 'modid' => $_SESSION['id_m023_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m023']], ), array ( 'id' => $_SESSION['id_m024_slot'], 'name' => $_SESSION[$_SESSION['id_m024_slot']], 'divid' => $_SESSION['id_m_d_m024'], 'modid' => $_SESSION['id_m024_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m024']], ), array ( 'id' => $_SESSION['id_m025_slot'], 'name' => $_SESSION[$_SESSION['id_m025_slot']], 'divid' => $_SESSION['id_m_d_m025'], 'modid' => $_SESSION['id_m025_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m025']], ), array ( 'id' => $_SESSION['id_m026_slot'], 'name' => $_SESSION[$_SESSION['id_m026_slot']], 'divid' => $_SESSION['id_m_d_m026'], 'modid' => $_SESSION['id_m026_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m026']], ), array ( 'id' => $_SESSION['id_m027_slot'], 'name' => $_SESSION[$_SESSION['id_m027_slot']], 'divid' => $_SESSION['id_m_d_m027'], 'modid' => $_SESSION['id_m027_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m027']], ), array ( 'id' => $_SESSION['id_m028_slot'], 'name' => $_SESSION[$_SESSION['id_m028_slot']], 'divid' => $_SESSION['id_m_d_m028'], 'modid' => $_SESSION['id_m028_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m028']], ), array ( 'id' => $_SESSION['id_m029_slot'], 'name' => $_SESSION[$_SESSION['id_m029_slot']], 'divid' => $_SESSION['id_m_d_m029'], 'modid' => $_SESSION['id_m029_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m029']], ), array ( 'id' => $_SESSION['id_m030_slot'], 'name' => $_SESSION[$_SESSION['id_m030_slot']], 'divid' => $_SESSION['id_m_d_m030'], 'modid' => $_SESSION['id_m030_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m030']], ), array ( 'id' => $_SESSION['id_m031_slot'], 'name' => $_SESSION[$_SESSION['id_m031_slot']], 'divid' => $_SESSION['id_m_d_m031'], 'modid' => $_SESSION['id_m031_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m031']], ), array ( 'id' => $_SESSION['id_m032_slot'], 'name' => $_SESSION[$_SESSION['id_m032_slot']], 'divid' => $_SESSION['id_m_d_m032'], 'modid' => $_SESSION['id_m032_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m032']], ), array ( 'id' => $_SESSION['id_m033_slot'], 'name' => $_SESSION[$_SESSION['id_m033_slot']], 'divid' => $_SESSION['id_m_d_m033'], 'modid' => $_SESSION['id_m033_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m033']], ), array ( 'id' => $_SESSION['id_m034_slot'], 'name' => $_SESSION[$_SESSION['id_m034_slot']], 'divid' => $_SESSION['id_m_d_m034'], 'modid' => $_SESSION['id_m034_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m034']], ), array ( 'id' => $_SESSION['id_m035_slot'], 'name' => $_SESSION[$_SESSION['id_m035_slot']], 'divid' => $_SESSION['id_m_d_m035'], 'modid' => $_SESSION['id_m035_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m035']], ), array ( 'id' => $_SESSION['id_m036_slot'], 'name' => $_SESSION[$_SESSION['id_m036_slot']], 'divid' => $_SESSION['id_m_d_m036'], 'modid' => $_SESSION['id_m036_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m036']], ), array ( 'id' => $_SESSION['id_m037_slot'], 'name' => $_SESSION[$_SESSION['id_m037_slot']], 'divid' => $_SESSION['id_m_d_m037'], 'modid' => $_SESSION['id_m037_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m037']], ), array ( 'id' => $_SESSION['id_m038_slot'], 'name' => $_SESSION[$_SESSION['id_m038_slot']], 'divid' => $_SESSION['id_m_d_m038'], 'modid' => $_SESSION['id_m038_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m038']], ), array ( 'id' => $_SESSION['id_m039_slot'], 'name' => $_SESSION[$_SESSION['id_m039_slot']], 'divid' => $_SESSION['id_m_d_m039'], 'modid' => $_SESSION['id_m039_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m039']], ), array ( 'id' => $_SESSION['id_m040_slot'], 'name' => $_SESSION[$_SESSION['id_m040_slot']], 'divid' => $_SESSION['id_m_d_m040'], 'modid' => $_SESSION['id_m040_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m040']], ), array ( 'id' => $_SESSION['id_m041_slot'], 'name' => $_SESSION[$_SESSION['id_m041_slot']], 'divid' => $_SESSION['id_m_d_m041'], 'modid' => $_SESSION['id_m041_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m041']], ), array ( 'id' => $_SESSION['id_m042_slot'], 'name' => $_SESSION[$_SESSION['id_m042_slot']], 'divid' => $_SESSION['id_m_d_m042'], 'modid' => $_SESSION['id_m042_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m042']], ), array ( 'id' => $_SESSION['id_m043_slot'], 'name' => $_SESSION[$_SESSION['id_m043_slot']], 'divid' => $_SESSION['id_m_d_m043'], 'modid' => $_SESSION['id_m043_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m043']], ), array ( 'id' => $_SESSION['id_m044_slot'], 'name' => $_SESSION[$_SESSION['id_m044_slot']], 'divid' => $_SESSION['id_m_d_m044'], 'modid' => $_SESSION['id_m044_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m044']], ), array ( 'id' => $_SESSION['id_m045_slot'], 'name' => $_SESSION[$_SESSION['id_m045_slot']], 'divid' => $_SESSION['id_m_d_m045'], 'modid' => $_SESSION['id_m045_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m045']], ), array ( 'id' => $_SESSION['id_m046_slot'], 'name' => $_SESSION[$_SESSION['id_m046_slot']], 'divid' => $_SESSION['id_m_d_m046'], 'modid' => $_SESSION['id_m046_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m046']], ), array ( 'id' => $_SESSION['id_m047_slot'], 'name' => $_SESSION[$_SESSION['id_m047_slot']], 'divid' => $_SESSION['id_m_d_m047'], 'modid' => $_SESSION['id_m047_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m047']], ), array ( 'id' => $_SESSION['id_m048_slot'], 'name' => $_SESSION[$_SESSION['id_m048_slot']], 'divid' => $_SESSION['id_m_d_m048'], 'modid' => $_SESSION['id_m048_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m048']], ), array ( 'id' => $_SESSION['id_m049_slot'], 'name' => $_SESSION[$_SESSION['id_m049_slot']], 'divid' => $_SESSION['id_m_d_m049'], 'modid' => $_SESSION['id_m049_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m049']], ), array ( 'id' => $_SESSION['id_m050_slot'], 'name' => $_SESSION[$_SESSION['id_m050_slot']], 'divid' => $_SESSION['id_m_d_m050'], 'modid' => $_SESSION['id_m050_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m050']], ), array ( 'id' => $_SESSION['id_m051_slot'], 'name' => $_SESSION[$_SESSION['id_m051_slot']], 'divid' => $_SESSION['id_m_d_m051'], 'modid' => $_SESSION['id_m051_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m051']], ), array ( 'id' => $_SESSION['id_m052_slot'], 'name' => $_SESSION[$_SESSION['id_m052_slot']], 'divid' => $_SESSION['id_m_d_m052'], 'modid' => $_SESSION['id_m052_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m052']], ), array ( 'id' => $_SESSION['id_m053_slot'], 'name' => $_SESSION[$_SESSION['id_m053_slot']], 'divid' => $_SESSION['id_m_d_m053'], 'modid' => $_SESSION['id_m053_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m053']], ), array ( 'id' => $_SESSION['id_m054_slot'], 'name' => $_SESSION[$_SESSION['id_m054_slot']], 'divid' => $_SESSION['id_m_d_m054'], 'modid' => $_SESSION['id_m054_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m054']], ), array ( 'id' => $_SESSION['id_m055_slot'], 'name' => $_SESSION[$_SESSION['id_m055_slot']], 'divid' => $_SESSION['id_m_d_m055'], 'modid' => $_SESSION['id_m055_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m055']], ), array ( 'id' => $_SESSION['id_m056_slot'], 'name' => $_SESSION[$_SESSION['id_m056_slot']], 'divid' => $_SESSION['id_m_d_m056'], 'modid' => $_SESSION['id_m056_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m056']], ), array ( 'id' => $_SESSION['id_m057_slot'], 'name' => $_SESSION[$_SESSION['id_m057_slot']], 'divid' => $_SESSION['id_m_d_m057'], 'modid' => $_SESSION['id_m057_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m057']], ), array ( 'id' => $_SESSION['id_m058_slot'], 'name' => $_SESSION[$_SESSION['id_m058_slot']], 'divid' => $_SESSION['id_m_d_m058'], 'modid' => $_SESSION['id_m058_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m058']], ), array ( 'id' => $_SESSION['id_m059_slot'], 'name' => $_SESSION[$_SESSION['id_m059_slot']], 'divid' => $_SESSION['id_m_d_m059'], 'modid' => $_SESSION['id_m059_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m059']], ), array ( 'id' => $_SESSION['id_m060_slot'], 'name' => $_SESSION[$_SESSION['id_m060_slot']], 'divid' => $_SESSION['id_m_d_m060'], 'modid' => $_SESSION['id_m060_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m060']], ), array ( 'id' => $_SESSION['id_m061_slot'], 'name' => $_SESSION[$_SESSION['id_m061_slot']], 'divid' => $_SESSION['id_m_d_m061'], 'modid' => $_SESSION['id_m061_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m061']], ), array ( 'id' => $_SESSION['id_m062_slot'], 'name' => $_SESSION[$_SESSION['id_m062_slot']], 'divid' => $_SESSION['id_m_d_m062'], 'modid' => $_SESSION['id_m062_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m062']], ), array ( 'id' => $_SESSION['id_m063_slot'], 'name' => $_SESSION[$_SESSION['id_m063_slot']], 'divid' => $_SESSION['id_m_d_m063'], 'modid' => $_SESSION['id_m063_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m063']], ), array ( 'id' => $_SESSION['id_m064_slot'], 'name' => $_SESSION[$_SESSION['id_m064_slot']], 'divid' => $_SESSION['id_m_d_m064'], 'modid' => $_SESSION['id_m064_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m064']], ), array ( 'id' => $_SESSION['id_m065_slot'], 'name' => $_SESSION[$_SESSION['id_m065_slot']], 'divid' => $_SESSION['id_m_d_m065'], 'modid' => $_SESSION['id_m065_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m065']], ), array ( 'id' => $_SESSION['id_m066_slot'], 'name' => $_SESSION[$_SESSION['id_m066_slot']], 'divid' => $_SESSION['id_m_d_m066'], 'modid' => $_SESSION['id_m066_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m066']], ), array ( 'id' => $_SESSION['id_m067_slot'], 'name' => $_SESSION[$_SESSION['id_m067_slot']], 'divid' => $_SESSION['id_m_d_m067'], 'modid' => $_SESSION['id_m067_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m067']], ), array ( 'id' => $_SESSION['id_m068_slot'], 'name' => $_SESSION[$_SESSION['id_m068_slot']], 'divid' => $_SESSION['id_m_d_m068'], 'modid' => $_SESSION['id_m068_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m068']], ), array ( 'id' => $_SESSION['id_m069_slot'], 'name' => $_SESSION[$_SESSION['id_m069_slot']], 'divid' => $_SESSION['id_m_d_m069'], 'modid' => $_SESSION['id_m069_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m069']], ), array ( 'id' => $_SESSION['id_m070_slot'], 'name' => $_SESSION[$_SESSION['id_m070_slot']], 'divid' => $_SESSION['id_m_d_m070'], 'modid' => $_SESSION['id_m070_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m070']], ), array ( 'id' => $_SESSION['id_m071_slot'], 'name' => $_SESSION[$_SESSION['id_m071_slot']], 'divid' => $_SESSION['id_m_d_m071'], 'modid' => $_SESSION['id_m071_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m071']], ), array ( 'id' => $_SESSION['id_m072_slot'], 'name' => $_SESSION[$_SESSION['id_m072_slot']], 'divid' => $_SESSION['id_m_d_m072'], 'modid' => $_SESSION['id_m072_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m072']], ), array ( 'id' => $_SESSION['id_m073_slot'], 'name' => $_SESSION[$_SESSION['id_m073_slot']], 'divid' => $_SESSION['id_m_d_m073'], 'modid' => $_SESSION['id_m073_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m073']], ), array ( 'id' => $_SESSION['id_m074_slot'], 'name' => $_SESSION[$_SESSION['id_m074_slot']], 'divid' => $_SESSION['id_m_d_m074'], 'modid' => $_SESSION['id_m074_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m074']], ), array ( 'id' => $_SESSION['id_m075_slot'], 'name' => $_SESSION[$_SESSION['id_m075_slot']], 'divid' => $_SESSION['id_m_d_m075'], 'modid' => $_SESSION['id_m075_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m075']], ), array ( 'id' => $_SESSION['id_m076_slot'], 'name' => $_SESSION[$_SESSION['id_m076_slot']], 'divid' => $_SESSION['id_m_d_m076'], 'modid' => $_SESSION['id_m076_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m076']], ), array ( 'id' => $_SESSION['id_m077_slot'], 'name' => $_SESSION[$_SESSION['id_m077_slot']], 'divid' => $_SESSION['id_m_d_m077'], 'modid' => $_SESSION['id_m077_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m077']], ), array ( 'id' => $_SESSION['id_m078_slot'], 'name' => $_SESSION[$_SESSION['id_m078_slot']], 'divid' => $_SESSION['id_m_d_m078'], 'modid' => $_SESSION['id_m078_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m078']], ), array ( 'id' => $_SESSION['id_m079_slot'], 'name' => $_SESSION[$_SESSION['id_m079_slot']], 'divid' => $_SESSION['id_m_d_m079'], 'modid' => $_SESSION['id_m079_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m079']], ), array ( 'id' => $_SESSION['id_m080_slot'], 'name' => $_SESSION[$_SESSION['id_m080_slot']], 'divid' => $_SESSION['id_m_d_m080'], 'modid' => $_SESSION['id_m080_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m080']], ), array ( 'id' => $_SESSION['id_m081_slot'], 'name' => $_SESSION[$_SESSION['id_m081_slot']], 'divid' => $_SESSION['id_m_d_m081'], 'modid' => $_SESSION['id_m081_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m081']], ), array ( 'id' => $_SESSION['id_m082_slot'], 'name' => $_SESSION[$_SESSION['id_m082_slot']], 'divid' => $_SESSION['id_m_d_m082'], 'modid' => $_SESSION['id_m082_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m082']], ), array ( 'id' => $_SESSION['id_m083_slot'], 'name' => $_SESSION[$_SESSION['id_m083_slot']], 'divid' => $_SESSION['id_m_d_m083'], 'modid' => $_SESSION['id_m083_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m083']], ), array ( 'id' => $_SESSION['id_m084_slot'], 'name' => $_SESSION[$_SESSION['id_m084_slot']], 'divid' => $_SESSION['id_m_d_m084'], 'modid' => $_SESSION['id_m084_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m084']], ), array ( 'id' => $_SESSION['id_m085_slot'], 'name' => $_SESSION[$_SESSION['id_m085_slot']], 'divid' => $_SESSION['id_m_d_m085'], 'modid' => $_SESSION['id_m085_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m085']], ), array ( 'id' => $_SESSION['id_m086_slot'], 'name' => $_SESSION[$_SESSION['id_m086_slot']], 'divid' => $_SESSION['id_m_d_m086'], 'modid' => $_SESSION['id_m086_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m086']], ), array ( 'id' => $_SESSION['id_m087_slot'], 'name' => $_SESSION[$_SESSION['id_m087_slot']], 'divid' => $_SESSION['id_m_d_m087'], 'modid' => $_SESSION['id_m087_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m087']], ), array ( 'id' => $_SESSION['id_m088_slot'], 'name' => $_SESSION[$_SESSION['id_m088_slot']], 'divid' => $_SESSION['id_m_d_m088'], 'modid' => $_SESSION['id_m088_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m088']], ), array ( 'id' => $_SESSION['id_m089_slot'], 'name' => $_SESSION[$_SESSION['id_m089_slot']], 'divid' => $_SESSION['id_m_d_m089'], 'modid' => $_SESSION['id_m089_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m089']], ), array ( 'id' => $_SESSION['id_m090_slot'], 'name' => $_SESSION[$_SESSION['id_m090_slot']], 'divid' => $_SESSION['id_m_d_m090'], 'modid' => $_SESSION['id_m090_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m090']], ), array ( 'id' => $_SESSION['id_m091_slot'], 'name' => $_SESSION[$_SESSION['id_m091_slot']], 'divid' => $_SESSION['id_m_d_m091'], 'modid' => $_SESSION['id_m091_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m091']], ), array ( 'id' => $_SESSION['id_m092_slot'], 'name' => $_SESSION[$_SESSION['id_m092_slot']], 'divid' => $_SESSION['id_m_d_m092'], 'modid' => $_SESSION['id_m092_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m092']], ), array ( 'id' => $_SESSION['id_m093_slot'], 'name' => $_SESSION[$_SESSION['id_m093_slot']], 'divid' => $_SESSION['id_m_d_m093'], 'modid' => $_SESSION['id_m093_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m093']], ), array ( 'id' => $_SESSION['id_m094_slot'], 'name' => $_SESSION[$_SESSION['id_m094_slot']], 'divid' => $_SESSION['id_m_d_m094'], 'modid' => $_SESSION['id_m094_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m094']], ), array ( 'id' => $_SESSION['id_m095_slot'], 'name' => $_SESSION[$_SESSION['id_m095_slot']], 'divid' => $_SESSION['id_m_d_m095'], 'modid' => $_SESSION['id_m095_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m095']], ), array ( 'id' => $_SESSION['id_m096_slot'], 'name' => $_SESSION[$_SESSION['id_m096_slot']], 'divid' => $_SESSION['id_m_d_m096'], 'modid' => $_SESSION['id_m096_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m096']], ), array ( 'id' => $_SESSION['id_m097_slot'], 'name' => $_SESSION[$_SESSION['id_m097_slot']], 'divid' => $_SESSION['id_m_d_m097'], 'modid' => $_SESSION['id_m097_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m097']], ), array ( 'id' => $_SESSION['id_m098_slot'], 'name' => $_SESSION[$_SESSION['id_m098_slot']], 'divid' => $_SESSION['id_m_d_m098'], 'modid' => $_SESSION['id_m098_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m098']], ), array ( 'id' => $_SESSION['id_m099_slot'], 'name' => $_SESSION[$_SESSION['id_m099_slot']], 'divid' => $_SESSION['id_m_d_m099'], 'modid' => $_SESSION['id_m099_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m099']], ), array ( 'id' => $_SESSION['id_m100_slot'], 'name' => $_SESSION[$_SESSION['id_m100_slot']], 'divid' => $_SESSION['id_m_d_m100'], 'modid' => $_SESSION['id_m100_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m100']], ), array ( 'id' => $_SESSION['id_m101_slot'], 'name' => $_SESSION[$_SESSION['id_m101_slot']], 'divid' => $_SESSION['id_m_d_m101'], 'modid' => $_SESSION['id_m101_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m101']], ), array ( 'id' => $_SESSION['id_m102_slot'], 'name' => $_SESSION[$_SESSION['id_m102_slot']], 'divid' => $_SESSION['id_m_d_m102'], 'modid' => $_SESSION['id_m102_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m102']], ), array ( 'id' => $_SESSION['id_m103_slot'], 'name' => $_SESSION[$_SESSION['id_m103_slot']], 'divid' => $_SESSION['id_m_d_m103'], 'modid' => $_SESSION['id_m103_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m103']], ), array ( 'id' => $_SESSION['id_m104_slot'], 'name' => $_SESSION[$_SESSION['id_m104_slot']], 'divid' => $_SESSION['id_m_d_m104'], 'modid' => $_SESSION['id_m104_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m104']], ), array ( 'id' => $_SESSION['id_m105_slot'], 'name' => $_SESSION[$_SESSION['id_m105_slot']], 'divid' => $_SESSION['id_m_d_m105'], 'modid' => $_SESSION['id_m105_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m105']], ), array ( 'id' => $_SESSION['id_m106_slot'], 'name' => $_SESSION[$_SESSION['id_m106_slot']], 'divid' => $_SESSION['id_m_d_m106'], 'modid' => $_SESSION['id_m106_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m106']], ), array ( 'id' => $_SESSION['id_m107_slot'], 'name' => $_SESSION[$_SESSION['id_m107_slot']], 'divid' => $_SESSION['id_m_d_m107'], 'modid' => $_SESSION['id_m107_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m107']], ), array ( 'id' => $_SESSION['id_m108_slot'], 'name' => $_SESSION[$_SESSION['id_m108_slot']], 'divid' => $_SESSION['id_m_d_m108'], 'modid' => $_SESSION['id_m108_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m108']], ), array ( 'id' => $_SESSION['id_m109_slot'], 'name' => $_SESSION[$_SESSION['id_m109_slot']], 'divid' => $_SESSION['id_m_d_m109'], 'modid' => $_SESSION['id_m109_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m109']], ), array ( 'id' => $_SESSION['id_m110_slot'], 'name' => $_SESSION[$_SESSION['id_m110_slot']], 'divid' => $_SESSION['id_m_d_m110'], 'modid' => $_SESSION['id_m110_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m110']], ), array ( 'id' => $_SESSION['id_m111_slot'], 'name' => $_SESSION[$_SESSION['id_m111_slot']], 'divid' => $_SESSION['id_m_d_m111'], 'modid' => $_SESSION['id_m111_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m111']], ), array ( 'id' => $_SESSION['id_m112_slot'], 'name' => $_SESSION[$_SESSION['id_m112_slot']], 'divid' => $_SESSION['id_m_d_m112'], 'modid' => $_SESSION['id_m112_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m112']], ), array ( 'id' => $_SESSION['id_m113_slot'], 'name' => $_SESSION[$_SESSION['id_m113_slot']], 'divid' => $_SESSION['id_m_d_m113'], 'modid' => $_SESSION['id_m113_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m113']], ), array ( 'id' => $_SESSION['id_m114_slot'], 'name' => $_SESSION[$_SESSION['id_m114_slot']], 'divid' => $_SESSION['id_m_d_m114'], 'modid' => $_SESSION['id_m114_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m114']], ), array ( 'id' => $_SESSION['id_m115_slot'], 'name' => $_SESSION[$_SESSION['id_m115_slot']], 'divid' => $_SESSION['id_m_d_m115'], 'modid' => $_SESSION['id_m115_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m115']], ), array ( 'id' => $_SESSION['id_m116_slot'], 'name' => $_SESSION[$_SESSION['id_m116_slot']], 'divid' => $_SESSION['id_m_d_m116'], 'modid' => $_SESSION['id_m116_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m116']], ), array ( 'id' => $_SESSION['id_m117_slot'], 'name' => $_SESSION[$_SESSION['id_m117_slot']], 'divid' => $_SESSION['id_m_d_m117'], 'modid' => $_SESSION['id_m117_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m117']], ), array ( 'id' => $_SESSION['id_m118_slot'], 'name' => $_SESSION[$_SESSION['id_m118_slot']], 'divid' => $_SESSION['id_m_d_m118'], 'modid' => $_SESSION['id_m118_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m118']], ), array ( 'id' => $_SESSION['id_m119_slot'], 'name' => $_SESSION[$_SESSION['id_m119_slot']], 'divid' => $_SESSION['id_m_d_m119'], 'modid' => $_SESSION['id_m119_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m119']], ), array ( 'id' => $_SESSION['id_m120_slot'], 'name' => $_SESSION[$_SESSION['id_m120_slot']], 'divid' => $_SESSION['id_m_d_m120'], 'modid' => $_SESSION['id_m120_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m120']], ), array ( 'id' => $_SESSION['id_m121_slot'], 'name' => $_SESSION[$_SESSION['id_m121_slot']], 'divid' => $_SESSION['id_m_d_m121'], 'modid' => $_SESSION['id_m121_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m121']], ), array ( 'id' => $_SESSION['id_m122_slot'], 'name' => $_SESSION[$_SESSION['id_m122_slot']], 'divid' => $_SESSION['id_m_d_m122'], 'modid' => $_SESSION['id_m122_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m122']], ), array ( 'id' => $_SESSION['id_m123_slot'], 'name' => $_SESSION[$_SESSION['id_m123_slot']], 'divid' => $_SESSION['id_m_d_m123'], 'modid' => $_SESSION['id_m123_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m123']], ), array ( 'id' => $_SESSION['id_m124_slot'], 'name' => $_SESSION[$_SESSION['id_m124_slot']], 'divid' => $_SESSION['id_m_d_m124'], 'modid' => $_SESSION['id_m124_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m124']], ), array ( 'id' => $_SESSION['id_m125_slot'], 'name' => $_SESSION[$_SESSION['id_m125_slot']], 'divid' => $_SESSION['id_m_d_m125'], 'modid' => $_SESSION['id_m125_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m125']], ), array ( 'id' => $_SESSION['id_m126_slot'], 'name' => $_SESSION[$_SESSION['id_m126_slot']], 'divid' => $_SESSION['id_m_d_m126'], 'modid' => $_SESSION['id_m126_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m126']], ), array ( 'id' => $_SESSION['id_m127_slot'], 'name' => $_SESSION[$_SESSION['id_m127_slot']], 'divid' => $_SESSION['id_m_d_m127'], 'modid' => $_SESSION['id_m127_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m127']], ), array ( 'id' => $_SESSION['id_m128_slot'], 'name' => $_SESSION[$_SESSION['id_m128_slot']], 'divid' => $_SESSION['id_m_d_m128'], 'modid' => $_SESSION['id_m128_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m128']], ), array ( 'id' => $_SESSION['id_m129_slot'], 'name' => $_SESSION[$_SESSION['id_m129_slot']], 'divid' => $_SESSION['id_m_d_m129'], 'modid' => $_SESSION['id_m129_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m129']], ), array ( 'id' => $_SESSION['id_m130_slot'], 'name' => $_SESSION[$_SESSION['id_m130_slot']], 'divid' => $_SESSION['id_m_d_m130'], 'modid' => $_SESSION['id_m130_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m130']], ), array ( 'id' => $_SESSION['id_m131_slot'], 'name' => $_SESSION[$_SESSION['id_m131_slot']], 'divid' => $_SESSION['id_m_d_m131'], 'modid' => $_SESSION['id_m131_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m131']], ), array ( 'id' => $_SESSION['id_m132_slot'], 'name' => $_SESSION[$_SESSION['id_m132_slot']], 'divid' => $_SESSION['id_m_d_m132'], 'modid' => $_SESSION['id_m132_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m132']], ), array ( 'id' => $_SESSION['id_m133_slot'], 'name' => $_SESSION[$_SESSION['id_m133_slot']], 'divid' => $_SESSION['id_m_d_m133'], 'modid' => $_SESSION['id_m133_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m133']], ), array ( 'id' => $_SESSION['id_m134_slot'], 'name' => $_SESSION[$_SESSION['id_m134_slot']], 'divid' => $_SESSION['id_m_d_m134'], 'modid' => $_SESSION['id_m134_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m134']], ), array ( 'id' => $_SESSION['id_m135_slot'], 'name' => $_SESSION[$_SESSION['id_m135_slot']], 'divid' => $_SESSION['id_m_d_m135'], 'modid' => $_SESSION['id_m135_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m135']], ), array ( 'id' => $_SESSION['id_m136_slot'], 'name' => $_SESSION[$_SESSION['id_m136_slot']], 'divid' => $_SESSION['id_m_d_m136'], 'modid' => $_SESSION['id_m136_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m136']], ), array ( 'id' => $_SESSION['id_m137_slot'], 'name' => $_SESSION[$_SESSION['id_m137_slot']], 'divid' => $_SESSION['id_m_d_m137'], 'modid' => $_SESSION['id_m137_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m137']], ), array ( 'id' => $_SESSION['id_m138_slot'], 'name' => $_SESSION[$_SESSION['id_m138_slot']], 'divid' => $_SESSION['id_m_d_m138'], 'modid' => $_SESSION['id_m138_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m138']], ), array ( 'id' => $_SESSION['id_m139_slot'], 'name' => $_SESSION[$_SESSION['id_m139_slot']], 'divid' => $_SESSION['id_m_d_m139'], 'modid' => $_SESSION['id_m139_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m139']], ), array ( 'id' => $_SESSION['id_m140_slot'], 'name' => $_SESSION[$_SESSION['id_m140_slot']], 'divid' => $_SESSION['id_m_d_m140'], 'modid' => $_SESSION['id_m140_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m140']], ), array ( 'id' => $_SESSION['id_m141_slot'], 'name' => $_SESSION[$_SESSION['id_m141_slot']], 'divid' => $_SESSION['id_m_d_m141'], 'modid' => $_SESSION['id_m141_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m141']], ), array ( 'id' => $_SESSION['id_m142_slot'], 'name' => $_SESSION[$_SESSION['id_m142_slot']], 'divid' => $_SESSION['id_m_d_m142'], 'modid' => $_SESSION['id_m142_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m142']], ), array ( 'id' => $_SESSION['id_m143_slot'], 'name' => $_SESSION[$_SESSION['id_m143_slot']], 'divid' => $_SESSION['id_m_d_m143'], 'modid' => $_SESSION['id_m143_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m143']], ), array ( 'id' => $_SESSION['id_m144_slot'], 'name' => $_SESSION[$_SESSION['id_m144_slot']], 'divid' => $_SESSION['id_m_d_m144'], 'modid' => $_SESSION['id_m144_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m144']], ), array ( 'id' => $_SESSION['id_m145_slot'], 'name' => $_SESSION[$_SESSION['id_m145_slot']], 'divid' => $_SESSION['id_m_d_m145'], 'modid' => $_SESSION['id_m145_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m145']], ), array ( 'id' => $_SESSION['id_m146_slot'], 'name' => $_SESSION[$_SESSION['id_m146_slot']], 'divid' => $_SESSION['id_m_d_m146'], 'modid' => $_SESSION['id_m146_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m146']], ), array ( 'id' => $_SESSION['id_m147_slot'], 'name' => $_SESSION[$_SESSION['id_m147_slot']], 'divid' => $_SESSION['id_m_d_m147'], 'modid' => $_SESSION['id_m147_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m147']], ), array ( 'id' => $_SESSION['id_m148_slot'], 'name' => $_SESSION[$_SESSION['id_m148_slot']], 'divid' => $_SESSION['id_m_d_m148'], 'modid' => $_SESSION['id_m148_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m148']], ), array ( 'id' => $_SESSION['id_m149_slot'], 'name' => $_SESSION[$_SESSION['id_m149_slot']], 'divid' => $_SESSION['id_m_d_m149'], 'modid' => $_SESSION['id_m149_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m149']], ), array ( 'id' => $_SESSION['id_m150_slot'], 'name' => $_SESSION[$_SESSION['id_m150_slot']], 'divid' => $_SESSION['id_m_d_m150'], 'modid' => $_SESSION['id_m150_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m150']], ), array ( 'id' => $_SESSION['id_m151_slot'], 'name' => $_SESSION[$_SESSION['id_m151_slot']], 'divid' => $_SESSION['id_m_d_m151'], 'modid' => $_SESSION['id_m151_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m151']], ), array ( 'id' => $_SESSION['id_m152_slot'], 'name' => $_SESSION[$_SESSION['id_m152_slot']], 'divid' => $_SESSION['id_m_d_m152'], 'modid' => $_SESSION['id_m152_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m152']], ), array ( 'id' => $_SESSION['id_m153_slot'], 'name' => $_SESSION[$_SESSION['id_m153_slot']], 'divid' => $_SESSION['id_m_d_m153'], 'modid' => $_SESSION['id_m153_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m153']], ), array ( 'id' => $_SESSION['id_m154_slot'], 'name' => $_SESSION[$_SESSION['id_m154_slot']], 'divid' => $_SESSION['id_m_d_m154'], 'modid' => $_SESSION['id_m154_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m154']], ), array ( 'id' => $_SESSION['id_m155_slot'], 'name' => $_SESSION[$_SESSION['id_m155_slot']], 'divid' => $_SESSION['id_m_d_m155'], 'modid' => $_SESSION['id_m155_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m155']], ), array ( 'id' => $_SESSION['id_m156_slot'], 'name' => $_SESSION[$_SESSION['id_m156_slot']], 'divid' => $_SESSION['id_m_d_m156'], 'modid' => $_SESSION['id_m156_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m156']], ), array ( 'id' => $_SESSION['id_m157_slot'], 'name' => $_SESSION[$_SESSION['id_m157_slot']], 'divid' => $_SESSION['id_m_d_m157'], 'modid' => $_SESSION['id_m157_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m157']], ), array ( 'id' => $_SESSION['id_m158_slot'], 'name' => $_SESSION[$_SESSION['id_m158_slot']], 'divid' => $_SESSION['id_m_d_m158'], 'modid' => $_SESSION['id_m158_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m158']], ), array ( 'id' => $_SESSION['id_m159_slot'], 'name' => $_SESSION[$_SESSION['id_m159_slot']], 'divid' => $_SESSION['id_m_d_m159'], 'modid' => $_SESSION['id_m159_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m159']], ), array ( 'id' => $_SESSION['id_m160_slot'], 'name' => $_SESSION[$_SESSION['id_m160_slot']], 'divid' => $_SESSION['id_m_d_m160'], 'modid' => $_SESSION['id_m160_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m160']], ), array ( 'id' => $_SESSION['id_m161_slot'], 'name' => $_SESSION[$_SESSION['id_m161_slot']], 'divid' => $_SESSION['id_m_d_m161'], 'modid' => $_SESSION['id_m161_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m161']], ), array ( 'id' => $_SESSION['id_m162_slot'], 'name' => $_SESSION[$_SESSION['id_m162_slot']], 'divid' => $_SESSION['id_m_d_m162'], 'modid' => $_SESSION['id_m162_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m162']], ), array ( 'id' => $_SESSION['id_m163_slot'], 'name' => $_SESSION[$_SESSION['id_m163_slot']], 'divid' => $_SESSION['id_m_d_m163'], 'modid' => $_SESSION['id_m163_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m163']], ), array ( 'id' => $_SESSION['id_m164_slot'], 'name' => $_SESSION[$_SESSION['id_m164_slot']], 'divid' => $_SESSION['id_m_d_m164'], 'modid' => $_SESSION['id_m164_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m164']], ), array ( 'id' => $_SESSION['id_m165_slot'], 'name' => $_SESSION[$_SESSION['id_m165_slot']], 'divid' => $_SESSION['id_m_d_m165'], 'modid' => $_SESSION['id_m165_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m165']], ), array ( 'id' => $_SESSION['id_m166_slot'], 'name' => $_SESSION[$_SESSION['id_m166_slot']], 'divid' => $_SESSION['id_m_d_m166'], 'modid' => $_SESSION['id_m166_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m166']], ), array ( 'id' => $_SESSION['id_m167_slot'], 'name' => $_SESSION[$_SESSION['id_m167_slot']], 'divid' => $_SESSION['id_m_d_m167'], 'modid' => $_SESSION['id_m167_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m167']], ), array ( 'id' => $_SESSION['id_m168_slot'], 'name' => $_SESSION[$_SESSION['id_m168_slot']], 'divid' => $_SESSION['id_m_d_m168'], 'modid' => $_SESSION['id_m168_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m168']], ), array ( 'id' => $_SESSION['id_m169_slot'], 'name' => $_SESSION[$_SESSION['id_m169_slot']], 'divid' => $_SESSION['id_m_d_m169'], 'modid' => $_SESSION['id_m169_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m169']], ), array ( 'id' => $_SESSION['id_m170_slot'], 'name' => $_SESSION[$_SESSION['id_m170_slot']], 'divid' => $_SESSION['id_m_d_m170'], 'modid' => $_SESSION['id_m170_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m170']], ), array ( 'id' => $_SESSION['id_m171_slot'], 'name' => $_SESSION[$_SESSION['id_m171_slot']], 'divid' => $_SESSION['id_m_d_m171'], 'modid' => $_SESSION['id_m171_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m171']], ), array ( 'id' => $_SESSION['id_m172_slot'], 'name' => $_SESSION[$_SESSION['id_m172_slot']], 'divid' => $_SESSION['id_m_d_m172'], 'modid' => $_SESSION['id_m172_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m172']], ), array ( 'id' => $_SESSION['id_m173_slot'], 'name' => $_SESSION[$_SESSION['id_m173_slot']], 'divid' => $_SESSION['id_m_d_m173'], 'modid' => $_SESSION['id_m173_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m173']], ), array ( 'id' => $_SESSION['id_m174_slot'], 'name' => $_SESSION[$_SESSION['id_m174_slot']], 'divid' => $_SESSION['id_m_d_m174'], 'modid' => $_SESSION['id_m174_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m174']], ), array ( 'id' => $_SESSION['id_m175_slot'], 'name' => $_SESSION[$_SESSION['id_m175_slot']], 'divid' => $_SESSION['id_m_d_m175'], 'modid' => $_SESSION['id_m175_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m175']], ), array ( 'id' => $_SESSION['id_m176_slot'], 'name' => $_SESSION[$_SESSION['id_m176_slot']], 'divid' => $_SESSION['id_m_d_m176'], 'modid' => $_SESSION['id_m176_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m176']], ), array ( 'id' => $_SESSION['id_m177_slot'], 'name' => $_SESSION[$_SESSION['id_m177_slot']], 'divid' => $_SESSION['id_m_d_m177'], 'modid' => $_SESSION['id_m177_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m177']], ), array ( 'id' => $_SESSION['id_m178_slot'], 'name' => $_SESSION[$_SESSION['id_m178_slot']], 'divid' => $_SESSION['id_m_d_m178'], 'modid' => $_SESSION['id_m178_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m178']], ), array ( 'id' => $_SESSION['id_m179_slot'], 'name' => $_SESSION[$_SESSION['id_m179_slot']], 'divid' => $_SESSION['id_m_d_m179'], 'modid' => $_SESSION['id_m179_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m179']], ), array ( 'id' => $_SESSION['id_m180_slot'], 'name' => $_SESSION[$_SESSION['id_m180_slot']], 'divid' => $_SESSION['id_m_d_m180'], 'modid' => $_SESSION['id_m180_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m180']], ), array ( 'id' => $_SESSION['id_m181_slot'], 'name' => $_SESSION[$_SESSION['id_m181_slot']], 'divid' => $_SESSION['id_m_d_m181'], 'modid' => $_SESSION['id_m181_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m181']], ), array ( 'id' => $_SESSION['id_m182_slot'], 'name' => $_SESSION[$_SESSION['id_m182_slot']], 'divid' => $_SESSION['id_m_d_m182'], 'modid' => $_SESSION['id_m182_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m182']], ), array ( 'id' => $_SESSION['id_m183_slot'], 'name' => $_SESSION[$_SESSION['id_m183_slot']], 'divid' => $_SESSION['id_m_d_m183'], 'modid' => $_SESSION['id_m183_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m183']], ), array ( 'id' => $_SESSION['id_m184_slot'], 'name' => $_SESSION[$_SESSION['id_m184_slot']], 'divid' => $_SESSION['id_m_d_m184'], 'modid' => $_SESSION['id_m184_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m184']], ), array ( 'id' => $_SESSION['id_m185_slot'], 'name' => $_SESSION[$_SESSION['id_m185_slot']], 'divid' => $_SESSION['id_m_d_m185'], 'modid' => $_SESSION['id_m185_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m185']], ), array ( 'id' => $_SESSION['id_m186_slot'], 'name' => $_SESSION[$_SESSION['id_m186_slot']], 'divid' => $_SESSION['id_m_d_m186'], 'modid' => $_SESSION['id_m186_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m186']], ), array ( 'id' => $_SESSION['id_m187_slot'], 'name' => $_SESSION[$_SESSION['id_m187_slot']], 'divid' => $_SESSION['id_m_d_m187'], 'modid' => $_SESSION['id_m187_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m187']], ), array ( 'id' => $_SESSION['id_m188_slot'], 'name' => $_SESSION[$_SESSION['id_m188_slot']], 'divid' => $_SESSION['id_m_d_m188'], 'modid' => $_SESSION['id_m188_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m188']], ), array ( 'id' => $_SESSION['id_m189_slot'], 'name' => $_SESSION[$_SESSION['id_m189_slot']], 'divid' => $_SESSION['id_m_d_m189'], 'modid' => $_SESSION['id_m189_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m189']], ), array ( 'id' => $_SESSION['id_m190_slot'], 'name' => $_SESSION[$_SESSION['id_m190_slot']], 'divid' => $_SESSION['id_m_d_m190'], 'modid' => $_SESSION['id_m190_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m190']], ), array ( 'id' => $_SESSION['id_m191_slot'], 'name' => $_SESSION[$_SESSION['id_m191_slot']], 'divid' => $_SESSION['id_m_d_m191'], 'modid' => $_SESSION['id_m191_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m191']], ), array ( 'id' => $_SESSION['id_m192_slot'], 'name' => $_SESSION[$_SESSION['id_m192_slot']], 'divid' => $_SESSION['id_m_d_m192'], 'modid' => $_SESSION['id_m192_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m192']], ), array ( 'id' => $_SESSION['id_m193_slot'], 'name' => $_SESSION[$_SESSION['id_m193_slot']], 'divid' => $_SESSION['id_m_d_m193'], 'modid' => $_SESSION['id_m193_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m193']], ), array ( 'id' => $_SESSION['id_m194_slot'], 'name' => $_SESSION[$_SESSION['id_m194_slot']], 'divid' => $_SESSION['id_m_d_m194'], 'modid' => $_SESSION['id_m194_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m194']], ), array ( 'id' => $_SESSION['id_m195_slot'], 'name' => $_SESSION[$_SESSION['id_m195_slot']], 'divid' => $_SESSION['id_m_d_m195'], 'modid' => $_SESSION['id_m195_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m195']], ), array ( 'id' => $_SESSION['id_m196_slot'], 'name' => $_SESSION[$_SESSION['id_m196_slot']], 'divid' => $_SESSION['id_m_d_m196'], 'modid' => $_SESSION['id_m196_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m196']], ), array ( 'id' => $_SESSION['id_m197_slot'], 'name' => $_SESSION[$_SESSION['id_m197_slot']], 'divid' => $_SESSION['id_m_d_m197'], 'modid' => $_SESSION['id_m197_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m197']], ), array ( 'id' => $_SESSION['id_m198_slot'], 'name' => $_SESSION[$_SESSION['id_m198_slot']], 'divid' => $_SESSION['id_m_d_m198'], 'modid' => $_SESSION['id_m198_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m198']], ), array ( 'id' => $_SESSION['id_m199_slot'], 'name' => $_SESSION[$_SESSION['id_m199_slot']], 'divid' => $_SESSION['id_m_d_m199'], 'modid' => $_SESSION['id_m199_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m199']], ), array ( 'id' => $_SESSION['id_m200_slot'], 'name' => $_SESSION[$_SESSION['id_m200_slot']], 'divid' => $_SESSION['id_m_d_m200'], 'modid' => $_SESSION['id_m200_slot'], 'parent' => $_SESSION['id_d_slot_id_'.$_SESSION['id_m_d_m200']], ), ); function prepareMenu($array) { $return = array(); //1 krsort($array); foreach ($array as $k => &$item) { if (is_numeric($item['parent'])) { $parent = $item['parent']; if (empty($array[$parent]['child'])) { $array[$parent]['child'] = array(); } //2 array_unshift($array[$parent]['child'],$item); unset($array[$k]); } } //3 ksort($array); return($array); } function buildMenu($array) { foreach ($array as $item) { if ($item['id'] > '1') { if ($item['id'] == 'd00') { echo '<li><a href="'.$_SESSION['pwfurl'].'/p_index.php?id_division=d00&id_module=m000">'; } elseif (strstr($item['id'],'d')) { echo '<li><a href="'.$_SESSION['pwfurl'].'/p_division.php?id_division_slot='.$item['divid'].'&id_division='.$item ['divid'].'&id_module='.$item['modid'].'">'; } else { echo '<li><a href="'.$_SESSION['pwfurl'].'/p_module.php?id_division_slot='.$item['divid'].'&id_division='.$item ['divid'].'&id_module='.$item['modid'].'">'; } echo $item['name'].'</a>'; echo '<ul>'; buildMenu($item['child']); echo '</ul>'; echo '</li>'; } } } $menu = prepareMenu($menu); buildMenu($menu); Quote Link to comment Share on other sites More sharing options...
Solution hansford Posted September 9, 2015 Solution Share Posted September 9, 2015 $ids = array(); foreach($menu as $array) { $ids[$array['id']] = $array; } ksort($ids); $menu = array_values($ids); print_r($menu); Quote Link to comment Share on other sites More sharing options...
Barand Posted September 9, 2015 Share Posted September 9, 2015 As you want to sort on the first element of each array then all you should need is sort($menu); 1 Quote Link to comment Share on other sites More sharing options...
PravinS Posted September 9, 2015 Share Posted September 9, 2015 Try using this function function sort_array($array, $sortkey, $order) { if ($order == "DESC") $or = "arsort"; else $or = "asort"; foreach ($array as $key => $array_row) { $sort_values[$key] = $array_row[$sortkey]; } $or($sort_values); reset($sort_values); while (list ($arr_key, $arr_val) = each($sort_values)) { $sorted_arr[] = $array[$arr_key]; } return $sorted_arr; } hope this will work for you Quote Link to comment Share on other sites More sharing options...
Barand Posted September 9, 2015 Share Posted September 9, 2015 or make use of a custom sort function with usort() function sort_array(&$menu, $key, $order='ASC') { usort($menu, function($a, $b) use ($key, $order) { $res = strcmp($a[$key], $b[$key]); return ($order=='DESC') ? -$res : $res; }); } Quote Link to comment Share on other sites More sharing options...
laural4705 Posted September 14, 2015 Author Share Posted September 14, 2015 This helped me to figure out sorts - thanks so much! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.