array_push()函数的返回值是int型,是压入数据后数组中元素的个数,可以为此函数传递多个变量作为参数,同时向数组压入多个变量。其形式为:
(array array,mixed variable [,mixed variable...])
下面这个例子在$fruits数组中又添加了两个水果:
$fruits = array("apple","banana"); array_push($fruits,"orange","pear") //$fruits = array("apple","banana","orange","pear")