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()会导致指针后移]
$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()会导致指针后移]
相关文章推荐
- PHPLinq :用SQL语法操作PHP数组。
- php语法基础(一)- 变量、常变量、函数、分支和循环、字符串、数组、类、时间、日期、包含文件、文件及图片读写等
- PHP 数组遍历 foreach 语法结构
- php使用数组语法访问对象
- **PHP** 语法(4)-函数&数组&超全局变量
- PHP 数组遍历foreach语法结构及实例
- PHP 数组遍历 foreach 语法结构
- PHP 数组遍历 foreach 语法结构
- PHP 学习笔记(一):基础教程:语法,变量,函数,数组,超全局
- php基础语法(控制语句、数组、函数)
- 数组和foreach循环 php语法
- PHP数组遍历语法讲解
- PHP语法-数组
- 【php语法】实现ArrayAccess接口,以数组的形式访问对象
- PHP 数组遍历foreach语法结构及实例
- PHP基本语法(六)—— 数组
- php基本语法之定义变量、输出内容、循环、数组、二维数组
- PHP基础语法之数组篇
- php语法-----03 php 数组相关
- PHP 数组遍历 foreach 语法结构