Ideally, I'd like the ability to add a 3rd array into an array of 2 arrays. I've tried array_push, array_merge, and array_merge_recursive. Here is the relevant code:
$array1 = array("color" => "red", "shape" => "triangle");
$array2 = array("color" => "green", "shape" => "trapezoid");
$array3 = array("color" => "blue", "shape" => "square");
$result = array($array1, $array2);
$result = array_merge($result, $array3);
print_r($result);
This current code returns: Array ( [0] => Array ( [color] => red [shape] => triangle ) [1] => Array ( [color] => green [shape] => trapezoid ) [color] => blue [shape] => square )
The problem with it is I need it to number the 3rd array as well. So, [0], [1], and [2]