array_push( ) pushes value onto the end of the array
//int array_push ( array &arr, mixed var [, mixed ...] )
<?
$firstname = "Johnny";
$names = array("Timmy", "Bobby", "Sam", "Tammy", "Joe");
array_push($names, $firstname);
?>
Related examples in the same category