英[p?p]   美[pɑ:p]   

vi. (Unexpectedly, suddenly) appear; appear suddenly; make a crackling sound; (suddenly) act

vt. (suddenly) reach out; (suddenly) ask a question; (suddenly take out something prepared); knock

n. pop music; soda; (especially used as a title) dad; (quickly) marked) mark

adj. Pop music; popular style

Third person singular: pops Plural: pops Present participle: popping Past tense: popped Past participle: popped

php array_pop() function syntax

Function:Delete the last element in the array

Syntax: array_pop(array)

Parameters:

ParametersDescription
arrayRequired. Specifies an array.?

Description: Returns the last value of the array. If the array is empty, or not an array, NULL will be returned.

php array_pop() function example

<?php
$a=array("西門(mén)","滅絕");
print_r(array_pop($a)); // 打印被刪除的元素
echo "<br>";
print_r($a);  //打印處理之后的數(shù)組
?>

Run instance?

Click the "Run instance" button to view the online instance

Output:

滅絕
Array ( [0] => 西門(mén) )


<?php
$a=array("無(wú)忌","歐陽(yáng)克","peter_zhu");
print_r(array_pop($a)); // 打印被刪除的元素
echo "<br>";
print_r($a);  //打印處理之后的數(shù)組
?>

Run Instance?

Click the "Run Instance" button to view the online instance

Output:

peter_zhu
Array ( [0] => 無(wú)忌 [1] => 歐陽(yáng)克 )