Or I need a more descriptive explanation on what you are trying to accomplish.
Anybody else have any ideas?
cmccarroll
ASKER
The reports array is who the user "mary" reports to john. The user "james" reports to mary, etc. I agree the array iseems to be a little redundant, which I think is by design. I am unable to change the existing array. What I am tyring to accomplish is a table like this I believe;
user position salary reports
john ceo 240000
mary cio 120000 john
james Sales Rep 50000 mary
jason CS Rep 24000 mary
jules CS Rep 24000 mary
charlie CTO 120000 john
david Sys Admin 75000 charlie
chirs Tech Support 75000 david
sharron Developer 100000 charlie
$array = array( 'john' => array( 'position' => 'CEO', 'salary' => 240000,
'reports'=>array( 'mary' => array( 'position' => 'CIO', 'salary' => 120000,
'reports'=>array( 'james'=>array('position' => 'Sales Rep', 'salary' => 50000,
'reports'=>array() ),'jason'=>array( 'position' => 'CS Rep', 'salary' => 24000,
'reports'=>array() ),'jules'=>array( 'position' => 'CS Rep', 'salary' => 24000,
'reports'=>array() ) ) ), 'charlie'=>array( 'position' => 'CTO', 'salary' => 120000,
'reports'=>array( 'david'=>array( 'position' => 'SysAdmin', 'salary' => 75000,
'reports'=>array( 'chris' => array( 'position' => 'Tech Support', 'salary' => 24000,
'reports'=>array() ) ) ),'sharon'=>array( 'position' => 'Developer', 'salary' => 100000,
'reports'=>array() ) ) ) ) ) );