This article mainly introduces how to add multiple variables to the end of an array in php through the array_push() function The method involves the skills of array_push() function in php to operate arrays. Friends who need it can refer to it
The example in this article describes how PHP adds multiple variables to the end of the array through the array_push() function. Share it with everyone for your reference. The specific analysis is as follows:
php adds multiple variables to the end of the array through the array_push() function. The array_push function accepts any number of variables to add.
?
3 4 5
|
$alpha = array("a", "b", "c");
$final = array_push($alpha, "d","e");
print "There are $total elements in $alpha "; "; } print ""; ?> |