php的数组语法

<?php

$array = array('step one', 'step two', 'step three', 'step four');

// by default, the pointer is on the first element
echo current($array) . "<br />"n"; // "step one"

// skip two steps
echo next($array)."<BR />";
echo reset($array);
?>

 

 

reset -- 将数组的内部指针指向第一个单元

详见list() ,each(),[next()对应pre()][next(),each()会导致指针后移]

posted @ 2009-04-28 16:40  小贱  阅读(206)  评论(0编辑  收藏  举报