<?php
$maxLine = 4; //每排人数
$no = 17;//学生编号
$line=ceil($no/$maxline);
$row=$no%$maxline?$no%$maxline:$maxline;
echo "编号<b>".$no."</b>的座位在第<b>".$line."</b>排第<b>".$row."</b>个位置";
?>
Notice: Undefined variable: maxline in /54/879/Hg57/index.php on line 5
Warning: Division by zero in /54/879/Hg57/index.php on line 5
Notice: Undefined variable: maxline in /54/879/Hg57/index.php on line 6
Warning: Division by zero in /54/879/Hg57/index.php on line 6
Notice: Undefined variable: maxline in /54/879/Hg57/index.php on line 6
编号17的座位在第0排第个位置
大小写注意~maxLine~