Home >Backend Development >PHP Tutorial >常用数组函数_PHP

常用数组函数_PHP

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-01 12:30:18924browse



常用数组函数



 $colors = array("red", "green", "blue","yellow");
 print("数组的个数:".count($colors)."
");//数组的个数
 print("数组的当前值:".current($colors)."
");//当前的值
 end($colors);
 print("数组的最后一个的值:".current($colors)."
");
 print("
");
 $slice = each($colors);//
 print("each()函数的使用:"."
");
 print($slice[0] . "====" . $slice[1] . "
\n");
 print($slice['key'] . "====" . $slice['value'] . "
\n");
?>


常用数组函数
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn