摘要: 如果你不给数组键名加',默认情况下PHP也不会报错,而会自动进行取代,给他加上'。但是这种情况是要极力杜绝的,很容易产生混淆。<?php$arr=array('fruit'=>'apple','veggie'=>'carrot');print $arr['fruit']; //appleprint $arr['veggie']; //carrotprint $arr[fruit]; //applledefine('fruit','veggie 阅读全文
posted @ 2013-01-15 15:38 saws 阅读(347) 评论(0) 推荐(0) 编辑