php报错 Parse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' inParse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in C:\Users\zhyoo\Software Development\phpFiles\view\lib\func.php on line 133133:i

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/29 22:15:31

php报错 Parse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' inParse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in C:\Users\zhyoo\Software Development\phpFiles\view\lib\func.php on line 133133:i
php报错 Parse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in
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("/.*{$

php报错 Parse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' inParse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in C:\Users\zhyoo\Software Development\phpFiles\view\lib\func.php on line 133133:i
变量的命名规则
变量名必须以字母或下划线 "_" 开头.
变量名只能包含字母数字字符以及下划线.
变量名不能包含空格.如果变量名由多个单词组成,那么应该使用下划线进行分隔(比如 $my_string),或者以大写字母开头(比如 $myString).
(变量名不能以数字开头)