PHP array_fill_keys() 函数
PHP 教程
· 2019-01-22 07:42:24
实例
用给定的指定键名的键值填充数组:
<?php
$keys=array("a","b","c","d");
$a1=array_fill_keys($keys,"blue");
print_r($a1);
?>
$keys=array("a","b","c","d");
$a1=array_fill_keys($keys,"blue");
print_r($a1);
?>
定义和用法
array_fill_keys() 函数用给定的指定键名的键值填充数组。
语法
array_fill_keys(keys,value);
| 参数 | 描述 |
|---|---|
| keys | 必需。数组,其值将被用于填充数组的键名。 |
| value | 必需。规定用于填充数组的键值。 |
技术细节
| 返回值: | 返回填充的数组。 |
|---|---|
| PHP 版本: | 5.2+ |
点击查看所有 PHP 教程 文章: https://www.codercto.com/courses/l/5.html
Is Parallel Programming Hard, And, If So, What Can You Do About
Paul E. McKenney
The purpose of this book is to help you understand how to program shared-memory parallel machines without risking your sanity.1 By describing the algorithms and designs that have worked well in the pa......一起来看看 《Is Parallel Programming Hard, And, If So, What Can You Do About 》 这本书的介绍吧!