RE: [PHP] Converting Array

From: Date: Thu, 26 Jun 2003 01:52:23 +0000
Subject: RE: [PHP] Converting Array
Groups: php.general 
Request: Send a blank email to php-general+get-152900@lists.php.net to get a copy of this message
what about (untested)? $example_data = array(); foreach ($blah_array as $key=>$value) { $example_data[] = array($key, $value); } -----Original Message----- From: John Wulff [mailto:johnw@orcasnet.com] Sent: Thursday, 26 June 2003 11:37 AM To: php-general@lists.php.net Subject: [PHP] Converting Array I've got an array in the following format: Array ( [Jan-1999] => 36.04,140.35,319.53,324.07 [Feb-1999] => 1.78,71.78,320.58,141.97 ) I need it in the following format: $example_data = array( array("Feb-1999",1.78,71.78,320.58,141.97), array("Jan-1999",36.04,140.35,319.53,324.07) ); I'm such an idiot when it comes to arrays that I can't figure this out. How do I do it? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __________ Information from NOD32 1.436 (20030612) __________ This message was checked by NOD32 for Exchange e-mail monitor. http://www.nod32.com

« previous php.general (#152900) next »