PHP 数组中=>这个是什么意思?请麻烦在给我解释一下!
$MyArray2=array("地支"=>array("子","丑","寅","卯"),"生肖"=>array("鼠","牛","虎","兔"),"数字"=>array...
$MyArray2 = array(
"地支" => array("子", "丑", "寅", "卯"),
"生肖" => array("鼠", "牛", "虎", "兔"),
"数字" => array(1, 2, 3, 4)
);
这些是什么意思?
$myarray = array("a","b","c");还有我这行哪有错误?
分数少了点。请原谅!
我想输出生肖中的兔怎么写? 展开
"地支" => array("子", "丑", "寅", "卯"),
"生肖" => array("鼠", "牛", "虎", "兔"),
"数字" => array(1, 2, 3, 4)
);
这些是什么意思?
$myarray = array("a","b","c");还有我这行哪有错误?
分数少了点。请原谅!
我想输出生肖中的兔怎么写? 展开
展开全部
PHP 数组中=> , 左边表示索引,右边表示键值;
$MyArray2 = array(
"地支" => array("子", "丑", "寅", "卯"),
"生肖" => array("鼠", "牛", "虎", "兔"),
"数字" => array(1, 2, 3, 4)
);
表示你定义了一个二维数组
$myarray = array("a","b","c");这个一维数组你定义的没有错
你可以使用
print_r函数打印出数组的值
参考:
<?php
$myarray = array("a","b","c");
print_r($myarray);
?>
$MyArray2 = array(
"地支" => array("子", "丑", "寅", "卯"),
"生肖" => array("鼠", "牛", "虎", "兔"),
"数字" => array(1, 2, 3, 4)
);
表示你定义了一个二维数组
$myarray = array("a","b","c");这个一维数组你定义的没有错
你可以使用
print_r函数打印出数组的值
参考:
<?php
$myarray = array("a","b","c");
print_r($myarray);
?>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询