Say I have an array:
$myArray = array("foo", "bar");
What is a good way to repeat the values in the array onto the end of the array so that:
$myArray = array("foo", "bar", "foo", "bar");
I thought maybe array_push would work like this:
array_push($myArray, $myArray);
but that actually pushes the array object and not the values of the array.
you can do this with
array_mergeThis will rely on you not worry about the array keys..
Another solution would be: