PHP array_values() 函数

PHP 教程 · 2019-01-22 16:41:29

实例

返回数组中所有的值(不保留键名):

<?php
$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

查看所有标签

CSS

CSS

David Sawyer McFarland / O'Reilly / 2006-08-24 / USD 34.99

Book Description Web site design has grown up. Unlike the old days, when designers cobbled together chunky HTML, bandwidth-hogging graphics, and a prayer to make their sites look good, Cascading St......一起来看看 《CSS》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

html转js在线工具
html转js在线工具

html转js在线工具