jdana
asked on
Append to 2-Dimensional Array
I can CREATE (and populate) a 2D array using something like this:
$fruits = array ( "fruits" => array ( "a" => "orange",
"b" => "banana",
"c" => "apple"
),
);
How the heck do I APPEND to an existing 2D array?
$fruits = array ( "fruits" => array ( "a" => "orange",
"b" => "banana",
"c" => "apple"
),
);
How the heck do I APPEND to an existing 2D array?
$fruits = array ( "fruits" => array ( "a" => "orange",
"b" => "banana",
"c" => "apple"
),
);
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It's actually straight-forward. Awesome!
$fruits['fruits'][] = 'mango';