array_push(current_array , value )
array_push() accept two basic parameters, first one is the current array you want to push the value. after that you can pass any number of values separated by commas.
<?php
$my_array = array('Me', 'You');
array_push($my_array, 'Others');
print_r($my_array);
/*
Array
(
[0] => Me
[1] => You
[2] => Others
)
*/
?>
No comments:
Post a Comment