在PHP中这些数组怎么用?

问题很简单,就是数组怎么用?问题好像有点开放,就是怎么利用name来使用这些数组,或者有没有更好的方法或者相关文章介绍。
附上我的神代码,小白在此谢过大神指点。抱拳抱拳再抱拳。

<?php
$shuzu[] =    array(
    "name"     => "数字",
    "slug"    => "1",
    "desc"     => "2",
    "id"     => "3",
    "type"     => "4"
);

$shuzu[] =    array(
    "name"     => "字母",
    "slug"    => "a",
    "desc"     => "b",
    "id"     => "c",
    "type"     => "d"
);

$shuzu[] =    array(
    "name"     => "组合",
    "slug"    => "q5",
    "desc"     => "w6",
    "id"     => "e7",
    "type"     => "r8"
);

?>
森栏
浏览 376回答 5
5回答

至尊宝的传说

<?php $Arr = [ '数字' => [ "slug" => "1", "desc" => "2", "id" => "3", "type" => "4" ], '字母' => [ "slug" => "a", "desc" => "b", "id" => "c", "type" => "d" ], '组合' => [ "slug" => "q5", "desc" => "w6", "id" => "e7", "type" => "r8" ], ]; echo '<pre>'; var_dump($Arr['数字'], $Arr['字母'], $Arr['组合']); 楼上+1;同附链接PHP多维数组修改了下,不知道楼主是否要实现这种?根据Key去读对应的Value,数组的元素也可以是数组。

江户川乱折腾

$shuzukey
打开App,查看更多内容
随时随地看视频慕课网APP