$arr_place=arry('beijing'=>"The capital of China.",少了一个a ==> array
解决方案 »
- php 读取图片
- htmlentities过滤问题
- 再问问题,简单问题80分到手。
- 如何能更好的解决PHP中fckeditor的上传木马的漏洞。
- Data too long for column 'body' at row 1
- mysql的排序问题
- 狂郁闷,从数据库提取文件只能输出4k?
- register_globals =On 为什么 这个地方改成on了 可是用phpinfo()看 还是register_globals =off
- 请教:怎样知道我的Php是否已经安装了GD库?
- php跨域访问的问题?
- 如何顯示多維數組
- 请问在下面的程序中: fputs($fp,"GET / HTTP/1.0\nHost: 192.168.0.127\n\n");中的GET / HTTP/1.0\nHost: 192.168.0.127\n\n是什么意思
另一个就是你在给数组赋值时他下面的跟上面是一体的你不能用回车分开.'shanghai'=>"The biggest commecial city in China.",有回车错.
'shenzheng'=>"The window of the worldforChina." 修改以后的代码.下面的你看看吧.<html>
<head>
<title>數組數據設定實例</title>
</head>
<body>
<?php
$arr_place=array('beijing'=>"The capital of China.", 'shanghai'=>"The biggest commecial city in China.", 'shenzheng'=>"The window of the worldforChina." );
print_r($arr_place);//显示
//遍历数组.
foreach($arr_place as $key=>$val) {
print "<BR>".$key."=>".$val;
}
?>
</body>
</html>