- array_push: documentation ( source)
<?php
// Create an array and push 5 elements on to it, then
// print the number of elements in your array to the screen
$types_of_fruit = array();
array_push($types_of_fruit, "Apples");
echo $types_of_fruit . "<br />";
array_push($types_of_fruit, "Bananas");
echo $types_of_fruit . "<br />";
array_push($types_of_fruit, "Oranges");
echo $types_of_fruit . "<br />";
array_push($types_of_fruit, "Lemons");
echo $types_of_fruit . "<br />";
array_push($types_of_fruit, "Limes");
echo $types_of_fruit . "<br />";
?>