$custom = Array( Array( 'name' => $name1, 'url' => $url1 ), Array( 'name' => $name_a, 'url' => $url_a ) );
I am trying to combine an array with the following:
$bread_elem = array('name' => 'Golf', 'url' => $slug . $parent_slug); array_splice($custom, 1, 0, $bread_elem);
I want my array to be next, with the value $sale_bread_elem
inserted at position 1 in the array. I do not see what I am doing wrong.
$custom = Array( Array( 'name' => $name1, 'url' => $url1 ), Array( 'name' => 'Golf', 'url' => $slug . $parent_slug ), Array( 'name' => $name_a, 'url' => $url_a ) );
source share