<?php
header('content-type:text/html;charset=utf-8');
echo <<<'AA'
<form>
行: <input type="text" name="a"> 列:<input type="text" name="b">
<button>确定</button>
</form>
AA;
$a=isset($_GET['a'])?$_GET['a']:null; $b=isset($_GET['b'])?$_GET['b']:null;
echo '<table border="1" cellpadding="5" cellspacing="0" width="600">';
for($i=1;$i<=$a;$i++){echo '<tr>';for($j=1;$j<=$b;$j++){
if($i>=$j){echo '<td>'.($j."x".$i."=".$i*$j).'</td>';}else{echo '<td></td>';}}
echo '</tr>';}
echo '</table>';
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号