The php array_pop of array function pops up the last element of the array

  • 2020-05-09 18:17:17
  • OfStack

 
<?php 
/* function array_pop(): At the end of the array 1 Unit pop up (out of stack)  
* 1 And grammar: mixed array_pop ( array &array ) 
* 2 , description:   Pop up and return  array  At the end of the array 1 The cells and the array  array  The length of the cut 1 . if  array  Null (or not an array) will be returned  NULL .  
* 3 Matters needing attention:  
* 3.1 ,  
*/ 
echo "***********************************************************************<br>"; 
$arr11=array(' results 1'=>65,' results 2'=>25,' results 3'=>87,' results 4'=>85,' results 5'=>45,' results 6'=>66); 
$arr22=array(a,b,c,d,e); 
echo " An array of arr11 Information: "; 
echo "<pre>"; 
print_r($arr11); 
echo "</pre>"; 
$num=count($arr11); 
for($i=0;$i<$num;$i++){ 
echo " The end of the array that pops up 1 An element is :".array_pop($arr11)."<br />"; 
echo " Every time the pop-up 1 After the last element, the array arr11 Information: "; 
echo "<pre>"; 
print_r($arr11); 
echo "</pre>"; 
echo "<br />"; 
} 
?> 

Related articles: