PHP: append an element to the end of the array
Note: If you use array_push() to add one element to the array it's better to use $array = because in that way there is no overhead of calling a function.
$elements = array(1,2,3,4,5,6);
foreach ($elements as $elem)
$newArray = $elem;
//sample output: Array (  => 1 => 2 => 3 => 4...)