//检查时候含有数据
public function initem($shopid){
if (array_key_exists($shopid,$this->item))
{
echo "Key exists!   www.msheji.com";
}
else 
{
echo "Key does not exist! www.msheji.com";
}} //稀奇古怪了 俩个括号  不在一起 就不行;

解决方案 »

  1.   

    什么意思?
    不能
    ....
    echo "Key does not exist! www.msheji.com";
    }
    }
    ???
      

  2.   

    你这个人挺有趣的class T{
      public function initem($shopid){
        if (array_key_exists($shopid,$this->item))
        {
           echo "Key exists! www.msheji.com";
        }
        else  
        {
           echo "Key does not exist! www.msheji.com";
        }
      }
    }没有什么问题呀
      

  3.   

    我发现 是我这个 zend 编辑器的问题  真是郁闷呀 
    谢谢你了哈 !