Blogger Information
Blog 250
fans 3
comment 0
visits 321548
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
数组:array()方法声明
梁凯达的博客
Original
1397 people have browsed it

<?php

//使用array()方法,是最常用的数组声明方式

//写法为: $变量名=array(键名=>键值,键名=>键值,键名=>键值)

//使用array()方式声明数组;//常用方式

//索引数组

$arr = array(1,'爸爸',2,'妈妈');

//不给出下标则默认下标

var_dump($arr);

//关键数组

$arr1 = array(1=>'大哥','爸爸'=>'大姐',2,'妈妈'=>'老干妈');

//不给出下标则默认下标

var_dump($arr1);

//


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post