The array:
Array
(
[0] => Array
(
[0] => Service Simulators
[1] => Array
(
[0] => 1.php
[1] => Title 1
)
)
[1] => Array
(
[0] => Service Simulators
[1] => Array
(
[0] => 2.php
[1] => Title 2
)
)
[2] => Array
(
[0] => Service Simulators
[1] => Array
(
[0] => 3.php
[1] => Title 3
)
)
[3] => Array
(
[0] => Service Simulators
[1] => Array
(
[0] => 4.php
[1] => Title 4
)
)
[4] => Array
(
[0] => Service Simulators
[1] => Array
(
[0] => 5.php
[1] => Title 5
)
)
[5] => Array
(
[0] => Trouble Shooting
[1] => Array
(
[0] => a.php
[1] => Title A
)
)
[6] => Array
(
[0] => Trouble Shooting
[1] => Array
(
[0] => b.php
[1] => Title B
)
)
[7] => Array
(
[0] => Deprecated
[1] => Array
(
[0] => 123.php
[1] => Title 123
)
)
[8] => Array
(
[0] => Admin Only
[1] => Array
(
[0] => admin.php
[1] => Title Admin
)
)
)
What I need
Array
(
[0] => Array
(
[0] => Service Simulators
[1] => Array
(
[0] => 1.php
[1] => Title 1
[3] => 2.php
[4] => Title 2
[5] => 3.php
[6] => Title 3
[7] => 4.php
[8] => Title 4
[9] => 5.php
[10] => Title 5
)
)
[1] => Array
(
[0] => Trouble Shooting
[1] => Array
(
[0] => a.php
[1] => Title A
[3] => b.php
[4] => Title B
)
)
[2] => Array
(
[0] => Deprecated
[1] => Array
(
[0] => 123.php
[1] => Title 123
)
)
[3] => Array
(
[0] => Admin Only
[1] => Array
(
[0] => admin.php
[1] => Title Admin
)
)
)
Whats happening
Array
(
[0] => Array
(
[0] => Service Simulators
[1] => Array
(
[0] => 5.php
[1] => Title 5
)
)
[1] => Array
(
[0] => Trouble Shooting
[1] => Array
(
[0] => b.php
[1] => Title B
)
)
[2] => Array
(
[0] => Deprecated
[1] => Array
(
[0] => 123.php
[1] => Title 123
)
)
[3] => Array
(
[0] => Admin Only
[1] => Array
(
[0] => admin.php
[1] => Title Admin
)
)
)
What I'm trying, it's coming from a query result set
$tmp_arr = array();
while($row = mysql_fetch_row($result))
{
// $row[1] = groupname
// $row[2] = pagename
// $row[3] = pagetitle
// Push to array
$build_arr_items = array($row[2],$row[3]);
array_push($tmp_arr, array($row[1], $build_arr_items)); // This builds the first example
//$tmp_arr[$row[1]]=$build_arr_items; // this is the overwrite example
}
any thoughts, help in the right direction?