On Wed, 25 Jun 2003 18:37:02 -0700, you wrote: >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 )
Assuming that I've interpreted your array structure correctly, $a = array ("Jan-1999" => array (36.04,140.35,319.53,324.07), "Feb-1999" => array (1.78,71.78,320.58,141.97) ); There are plenty of possible solutions. Here's a slightly perverse one: $f = create_function ('$x, $y', 'return (array_merge(array($x), $y));'); $a = array_map($f, array_keys ($a), $a); Otherwise... loop from 0 to sizeof ($array), replacing each element of the array with array($key) + $value -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php