我想将我的清单安排如下:
Subject Chapter MCQ Duration(min)
Physics 1 10 40 40
Chemistry 1 9 30 30
Math 1 10 40 40
Biology 1 12 40 20
因此,我尝试了以下操作:
<div style="font-family: "Lucida Sans Unicode"">
<?php
include_once('funcs.php');
$f = new funcs();
$res = $f->get_ques();
printf("%-'.20s", 'Subject');
printf("%-'.20s", 'Chapter');
printf("%-'.20s", 'Marks');
printf("%-'.20s", 'Duration');
?>
<br/>
<select>
<?php
while( $q = mysql_fetch_array( $res ) ) {
echo '<option>', printf("%-'-20s", $f->get_sub($q['q_id'])), printf("%-'.20s", $q['chapter']), printf("%-'.20s", $q['mcq']), printf("%-'.20s", $q['time']), '</option>';
}
?>
</select>
</div>
我的输出是:
线条是曲折的。我希望这些线是严格的。我尝试使用固定长度字体但失败了。我应该删除这些点。也是。任何人请帮助我。