
php报错 Parse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in
Parseerror:syntaxerror,unexpectedT_LNUMBER,expectingT_VARIABLEor'$'inC:\Users\zhyoo\S...
Parse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in C:\Users\zhyoo\Software Development\phpFiles\view\lib\func.php on line 133
133:if($12==6)
这段程序是这样的:
为什么就if($12==6)报错呢?
function str2arr($str){
$arrayitem = array();
$arrs = explode('__',$str);
if(!empty($arrs))
{
foreach($arrs as $k=>$v)
{
$vv = explode(',',$v);
if(count($vv)==3)
{
$l1 = $vv[0];
$l2 = $vv[1];
$l3 = $vv[2];
if($l2==1)
{
$arrayitem[$l1]=$l3;
}
if($l2==2)
{
$arrayitem = qujian($l1,$arrayitem,'$gt',$l3);
//$arrayitem[$l1]=array('$gt'=>$l3);
}
if($l2==3)
{
$arrayitem = qujian($l1,$arrayitem,'$lt',$l3);
//$arrayitem[$l1]=array('$lt'=>$l3);
}
if($l2==4)
{
$arrayitem = qujian($l1,$arrayitem,'$gte',$l3);
//$arrayitem[$l1]=array('$gte'=>$l3);
}
if($l2==5)
{
$arrayitem = qujian($l1,$arrayitem,'$lte',$l3);
//$arrayitem[$l1]=array('$lte'=>$l3);
}
if($12==6)
{
$arrayitem[$11]=array('$ne'=>$13);
}
if($l2==7)
{
$arrayitem[$l1]=new MongoRegex("/.*{$ 展开
133:if($12==6)
这段程序是这样的:
为什么就if($12==6)报错呢?
function str2arr($str){
$arrayitem = array();
$arrs = explode('__',$str);
if(!empty($arrs))
{
foreach($arrs as $k=>$v)
{
$vv = explode(',',$v);
if(count($vv)==3)
{
$l1 = $vv[0];
$l2 = $vv[1];
$l3 = $vv[2];
if($l2==1)
{
$arrayitem[$l1]=$l3;
}
if($l2==2)
{
$arrayitem = qujian($l1,$arrayitem,'$gt',$l3);
//$arrayitem[$l1]=array('$gt'=>$l3);
}
if($l2==3)
{
$arrayitem = qujian($l1,$arrayitem,'$lt',$l3);
//$arrayitem[$l1]=array('$lt'=>$l3);
}
if($l2==4)
{
$arrayitem = qujian($l1,$arrayitem,'$gte',$l3);
//$arrayitem[$l1]=array('$gte'=>$l3);
}
if($l2==5)
{
$arrayitem = qujian($l1,$arrayitem,'$lte',$l3);
//$arrayitem[$l1]=array('$lte'=>$l3);
}
if($12==6)
{
$arrayitem[$11]=array('$ne'=>$13);
}
if($l2==7)
{
$arrayitem[$l1]=new MongoRegex("/.*{$ 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询