PHP array_values() 函数
PHP 教程
· 2019-01-22 16:41:29
实例
返回数组中所有的值(不保留键名):
<?php
$a=array("Name"=>"Peter","Age"=>"41","Country"=>"USA");
print_r(array_values($a));
?>
$a=array("Name"=>"Peter","Age"=>"41","Country"=>"USA");
print_r(array_values($a));
?>
定义和用法
array_values() 函数返回包含数组中所有的值的数组。
提示:被返回的数组将使用数值键,从 0 开始且以 1 递增。
语法
array_values(array)
| 参数 | 描述 |
|---|---|
| array | 必需。规定数组。 |
技术细节
| 返回值: | 返回包含数组中所有的值的数组。 |
|---|---|
| PHP 版本: | 4+ |
点击查看所有 PHP 教程 文章: https://codercto.com/courses/l/5.html
Where Wizards Stay Up Late
Katie Hafner / Simon & Schuster / 1998-1-21 / USD 16.00
Twenty five years ago, it didn't exist. Today, twenty million people worldwide are surfing the Net. "Where Wizards Stay Up Late" is the exciting story of the pioneers responsible for creating the most......一起来看看 《Where Wizards Stay Up Late》 这本书的介绍吧!