欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

php通過array_shift()函數(shù)移除數(shù)組第一個(gè)元素的方法

 更新時(shí)間:2015年03月18日 11:24:24   作者:work24  
這篇文章主要介紹了php通過array_shift()函數(shù)移除數(shù)組第一個(gè)元素的方法,涉及php中array_shift()函數(shù)操作數(shù)組的技巧,具有一定參考借鑒價(jià)值,需要的朋友可以參考下

本文實(shí)例講述了php通過array_shift()函數(shù)移除數(shù)組第一個(gè)元素的方法。分享給大家供大家參考。具體分析如下:

下面的代碼通過array_shift()函數(shù)加while循環(huán)不斷移除數(shù)組的第一個(gè)元素,直到數(shù)組為空

<?php
$alpha = array("a", "b", "c");
while ( count( $alpha ) ) {
 $val = array_shift( $alpha);
 print "$val<br />";
 print "there are ".count( $alpha )." elements in \$alpha <br />";
}
?>

希望本文所述對(duì)大家的php程序設(shè)計(jì)有所幫助。

相關(guān)文章

最新評(píng)論