<!--html表单提交页面-->
<form action="index.PHP" method="post">
<select>
<option value ="zq" name="hobby[]" >足球</option>
<option value ="lq" name="hobby[]" >篮球</option>
</select>
<input type="submit" value="提交">
</form>
<!--php接受页面-->
<?php
$yourpost=$_POST['hobby'];
print_r $yourpost;
?>
报个Parse error: syntax error, unexpected '$yourpost' (T_VARIABLE) in D:\apache2.4.10VC9\Apache24\htdocs\test\index.php on line 3的错。
请同学看一下哪里错了?
------解决思路----------------------
print_r ( $yourpost);
print_r 是函数