我在php中收到此错误。谁能帮忙!!它说
意外'$ arr'(T_VARIABLE)
。什么是T_variable ??
<?php $d=date("D"); if ($d=="Fri") echo "Have a nice weekend!"; else echo "Have a nice day!";
print "\nday is $d";
$array = array( 1, 2, 3, 4, 5); foreach( $array as $value ) { echo "Value is $value <br />"; }
print "\n associative arrays"
$arr = array(
"key1" => value1,
"key2"=> value2,
"key3"=> value3
);
echo "printing out";
//foreach($arr as $value)
//echo "$value ";
?>
答案 0 :(得分:2)
你忘记了分号。
print "...";
答案 1 :(得分:0)
更改行:
print "\n associative arrays"
到:
print "\n associative arrays";
答案 2 :(得分:0)
在
之后添加分号print "\n associative arrays";