Hi I have below strustrue
[1] => Array
(
[menuName] => Apps
[menuUrl] => /Apps
[Invisible_Mode] =>
[subMenu] => Array
(
[0] => Array
(
[subMenuName] => Collaboration
[subMenuUrl] => /Apps/Collaboration
[subitemCount] => 5
[Invisible_Mode] =>
)
[1] => Array
(
[subMenuName] => Sales
[subMenuUrl] => /Apps/Sales
[subitemCount] => 11
[Invisible_Mode] =>
)
[2] => Array
(
[subMenuName] => Project Management
[subMenuUrl] => /Apps/Project-Management
[subitemCount] => 5
[Invisible_Mode] =>
)
[3] => Array
(
[subMenuName] => Human Resources
[subMenuUrl] => /Apps/Human-Resources
[subitemCount] => 7
[Invisible_Mode] =>
)
[4] => Array
(
[subMenuName] => Marketing
[subMenuUrl] => /Apps/Marketing
[subitemCount] => 8
[Invisible_Mode] =>
) ) )
i need array like below (using the above array),
[1] => Array
(
[menuName] => Apps
[menuUrl] => /Apps
[Invisible_Mode] =>
[subMenu] => Array
(
[Collaboration] => Array
(
[subMenuName] => Collaboration
[subMenuUrl] => /Apps/Collaboration
[subitemCount] => 5
[Invisible_Mode] =>
)
[Sales] => Array
(
[subMenuName] => Sales
[subMenuUrl] => /Apps/Sales
[subitemCount] => 11
[Invisible_Mode] =>
)
[Project Management] => Array
(
[subMenuName] => Project Management
[subMenuUrl] => /Apps/Project-Management
[subitemCount] => 5
[Invisible_Mode] =>
)
[Human Resources] => Array
(
[subMenuName] => Human Resources
[subMenuUrl] => /Apps/Human-Resources
[subitemCount] => 7
[Invisible_Mode] =>
)
[Marketing] => Array
(
[subMenuName] => Marketing
[subMenuUrl] => /Apps/Marketing
[subitemCount] => 8
[Invisible_Mode] =>
) ) )
How can i do this?
usort
.