level 1
我要来呸你
楼主
目标是把输入的5个数按小到大排序输出
<?if(isset($_GET['sb'])){$arr=$_GET['T'];
$arr=sort($arr);
foreach($arr as $a){echo $a." ";}}?>
<?echo "<form method='GET'>";
for($i=1;$i<6;$i++)
{echo "<input type='text' name='T[]' size='5'>";
if($i<5)echo "-";}
echo "<input type='submit' name='sb' value='sb'>";
echo "</form>"."<br>";
?>
出现错误:
Warning: Invalid argument supplied for foreach() in
/home/sw10/sw1062/html/ex6-1.php on line 5
2013年04月16日 14点04分
1
<?if(isset($_GET['sb'])){$arr=$_GET['T'];
$arr=sort($arr);
foreach($arr as $a){echo $a." ";}}?>
<?echo "<form method='GET'>";
for($i=1;$i<6;$i++)
{echo "<input type='text' name='T[]' size='5'>";
if($i<5)echo "-";}
echo "<input type='submit' name='sb' value='sb'>";
echo "</form>"."<br>";
?>
出现错误:
Warning: Invalid argument supplied for foreach() in
/home/sw10/sw1062/html/ex6-1.php on line 5