有人能告訴我哪錯了嗎
?function postiont($maxline,$no){ ? ? $line = ceil($no/$maxLine); ? ? ? ?$row = $no%$maxLine?$no%$maxLine:$maxLine; ? ? ?return $line; ? ? ?return $row; } $m = 4; //每排人數(shù) $no = 20;//學生編號 echo ?postiont($m,$no);
?function postiont($maxline,$no){ ? ? $line = ceil($no/$maxLine); ? ? ? ?$row = $no%$maxLine?$no%$maxLine:$maxLine; ? ? ?return $line; ? ? ?return $row; } $m = 4; //每排人數(shù) $no = 20;//學生編號 echo ?postiont($m,$no);
2018-03-09
舉報
2018-06-11
大小寫改一下就好
2018-03-22
圖中劃紅線的位置,應該是maxLine,中間有個字母要大寫。
其次,一個函數(shù)只能有一個返回值,你需要返回兩個,應該把這兩個值放在數(shù)組里面,返回數(shù)組