At 01:38 30.05.2003, John Wulff said: --------------------[snip]-------------------- >I'm new to working with complex arrays/objects and need a little help. >Below is the array I need to convert to a different type of array. The >"begin what i have" section is data I've succesfully mined from an XML file. >The data labeled "desired output" is how I need the data to be formatted. >How do I do this? --------------------[snip]--------------------
$result = array(); while (list($key, $object) = each($whatihavelist)) { $result[] = array($object->name, $object->stocks, $object->bonds, $object->mutual, $object->insurance, $object->other); } But why would you want to skip your nicely named, easily readable objects in favour of sequentially numbered arrays? Just wondering... -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php