php问题求帮助,以下函数返回值为何一直是100?
程序员文章站
2022-05-22 21:12:16
...
返回值php函数
$qc_q1=$_POST['q1'];$qc_q2=$_POST['q2'];$qc_q3=$_POST['q3'];$qc_q4=$_POST['q4'];$qc_q5=$_POST['q5'];$qc_q6=$_POST['q6'];$qc_q7=$_POST['q7'];$qc_q8=$_POST['q8'];$qc_q9=$_POST['q9'];$qc_q10=$_POST['q10'];$qc_Choice = array($qc_q1,$qc_q2,$qc_q3,$qc_q4,$qc_q5,$qc_q6,$qc_q7,$qc_q8,$qc_q9,$qc_q10);$qc_Answer = array('a','d','d','b','b','c','d','d','c','c');$qc_total = qcFunction($qc_Choice,$qc_Answer);function qcFunction($qc_Choice,$qc_Answer){ $total=0; for($i=0;$i