array_shift.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> array_shift.php </title>
<meta charset="UTF-8">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<body>
<?php
$input = array("a", "b", "two"=>"c", "d", "e");
var_dump($input);
echo "<hr><hr>shift input :<hr>";
//mixed array_shift ( array &array )
$output = array_shift($input);
var_dump($output);
echo "<hr><hr><hr>";
var_dump($input);
echo "<hr><hr><hr>";
?>
</body>
</html>
array 0 => "a" (length=1) 1 => "b" (length=1) "two" => "c" (length=1) 2 => "d" (length=1) 3 => "e" (length=1)
shift input :
"a" (length=1)
array 0 => "b" (length=1) "two" => "c" (length=1) 1 => "d" (length=1) 2 => "e" (length=1)
声明:该文观点仅代表作者本人,入门客AI创业平台信息发布平台仅提供信息存储空间服务,如有疑问请联系rumenke@qq.com。
- 上一篇: Nodejs基于Express4的动态页面静态化
- 下一篇: arsort.php
