PHP array_fill() 函数
PHP 教程
· 2019-01-22 07:28:26
实例
用给定的键值填充数组:
<?php
$a1=array_fill(3,4,"blue");
print_r($a1);
?>
$a1=array_fill(3,4,"blue");
print_r($a1);
?>
定义和用法
array_fill() 函数用给定的键值填充数组。
语法
array_fill(index,number,value);
| 参数 | 描述 |
|---|---|
| index | 必需。规定返回数组的起始索引。 |
| number | 必需。规定填充的元素的数量,其值必须大于 0。 |
| value | 必需。规定用于填充数组的键值。 |
技术细节
| 返回值: | 返回填充的数组。 |
|---|---|
| PHP 版本: | 4.2+ |
点击查看所有 PHP 教程 文章: https://codercto.com/courses/l/5.html
Ordering Disorder
Khoi Vinh / New Riders Press / 2010-12-03 / USD 29.99
The grid has long been an invaluable tool for creating order out of chaos for designers of all kinds—from city planners to architects to typesetters and graphic artists. In recent years, web designers......一起来看看 《Ordering Disorder》 这本书的介绍吧!