您的位置:首页 > 编程语言 > PHP开发

php的数组语法

2009-04-28 16:40 176 查看
<?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()会导致指针后移]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: