欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

诡异事件,数组有关问题

程序员文章站 2024-01-08 18:31:10
...
诡异事件,数组问题
PHP code


$list=Array
(
    [page] => Array
        (
            [page_id] => 1,
            [path] => tiyee.html,
            [templates] => zj001.tpl,
            [key] => 21212121,
        ),

    [qianggou] => Array
        (
            [object_id] => 1,
            [number] => 0,
            [oldprice] => 0.00,
            [newprice] => 0.00,
            [begintime] => 0000-00-00 00:00:00,
            [endtime] => 0000-00-00 00:00:00,
            [limit_b] => 0000-00-00 00:00:00,
            [limit_e] => 0000-00-00 00:00:00,
            [type] => 1,
            [saleout] => 0,
            [classtime] => 0000-00-00 00:00:00,
            [page_id] => 1,
        ),

    [miaosha] => Array
        (
            [object_id] => 2,
            [number] => 0,
            [oldprice] => 0.00,
            [newprice] => 0.00,
            [begintime] => 2010-04-18 23:42:10,
            [endtime] => 2010-04-18 23:42:10,
            [limit_b] => 2010-04-18 23:42:10,
            [limit_e] => 2010-04-18 23:42:10,
            [type] => 2,
            [saleout] => 0,
            [classtime] => 0000-00-00 00:00:00,
            [page_id] => 1,
        )

)

echo '
';
print_r($list['page']);






结果为什么是1?明明应该是个数组啊?

------解决方案--------------------
PHP code
$list=array(
    'page' => array (
            'page_id' => 1,
            'path' => 'tiyee.html',
            'templates' => 'zj001.tpl',
            'key' => 21212121
        )
);
print_r($list['page']); 
诡异事件,数组有关问题

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。

相关文章

相关视频


上一篇:

下一篇: