how to make group aray in simple php [duplicate]

  arrays, php

i have array menu

array(3) { 
    ["url"]     => "Dashboard" 
    ["name"]    => "Home" 
    ["menu_id"] => "1" 
} 
array(3) { 
    ["url"]     =>  "Dashboard/1" 
    ["name"]    =>  "Kategori Kejadian" 
    ["menu_id"] =>  "1" 
} 
array(3) { 
    ["url"]     => "Kejadian/baru" 
    ["name"]    => "Input Kejadian Baru" 
    ["menu_id"] => "2" 
} 
array(3) { 
    ["url"]     => "fitur/req_bantuan" 
    ["name"]    => "Request & Kirim Bantuan" 
    ["menu_id"] => "2" 
} 
array(3) { 
    ["url"]     => "emergency_button/alarm" 
    ["name"]    => "Monitoring Alarm Kejadian" 
    ["menu_id"] => "3" 
} 
array(3) { 
    ["url"]     => "rekap/lap_kejadian_all" 
    ["name"]    => "Laporan Kejadian" 
    ["menu_id"] => "3" 
} 

how i can group this array by menu_id???
On the above example menu_id have 2 items, so its need to be inside of the menu_id

Source: Ask PHP

LEAVE A COMMENT