PHP之数组array
2015-09-17 15:25
656 查看
$switching = array( 10, // key = 0
5 => 6,
3 => 7,
'a' => 4,
11, // key = 6 (maximum of integer-indices was 5)
'8' => 2, // key = 8 (integer!)
'02' => 77, // key = '02'
0 => 12 // the value 10 will be overwritten by 12
);
var_dump($switching);
输出如下:
array (size=7)
0 => int 12
5 => int 6
3 => int 7
'a' => int 4
6 => int 11
8 => int 2
'02' => int 77
5 => 6,
3 => 7,
'a' => 4,
11, // key = 6 (maximum of integer-indices was 5)
'8' => 2, // key = 8 (integer!)
'02' => 77, // key = '02'
0 => 12 // the value 10 will be overwritten by 12
);
var_dump($switching);
输出如下:
array (size=7)
0 => int 12
5 => int 6
3 => int 7
'a' => int 4
6 => int 11
8 => int 2
'02' => int 77
相关文章推荐
- 我的第一个PHP 自定义函数:验证码生成
- PHP7革新与性能优化
- PHP执行SQL文件并将SQL文件导入到数据库
- php的apc扩展浅析(一)
- php验证身份证号码正确性
- 关于ltrim,rtrim,和trim的用法
- 【设置】PotPlayer播放完毕后停止
- php的错误和异常处理
- ContentProvider使用
- fileoutputstream向本地文件写内容(2015年9月17日)
- 输入输出之转换流InputStreamReader&OutputStreamWriter
- PHP的date 函数
- ContentProvider+BroadcastReceiver综合练习
- PHP_EOL
- laravel 分页 说明
- vsftpd配置文件详解
- phpcms数据库操作
- php的面向对象
- wamp升级php5.3.10到php5.6.13版本
- PHP递归实现无限级分类