如何使网格的大小是根据用户的输入,如果某些条件都为真,那么它的一些箱子是与colour.This的填充我的code.If是这样,我给常数值
呼应美元table_string =(4,3),它工作得很好,但如果我给它通过用户的像THI
输入值呼应table_string =表("noOfProcess,3);表不会显示
<html>
<head>
<title> Sheduling Algorithms </title>
</head>
<body>
<form method = "post" action = ""><br>
Number Of Processess: <input type = "text" name="noOfProcess" /><br>
<input type = "radio" name = "algo" value= "FCFS" /> FCFS <br>
<input type = "radio" name = "algo" value = "SPN" > SPN <br>
<input type = "radio" name = "algo" value = "SRT" /> SRT <br>
<input type = "radio" name = "algo" value = "RRH" /> RRH <br>
<input type= "submit">
</form>
</body>
</html>
<?php
function Table($rows,$columns)
{
$table_string =
"<table border='1' >
<tr>
<th> Process # </th>
<th> Arrival Time </th>
<th> Service Time</th>
</tr>";
for($j=0;$j<$columns;$j++)
{
$column_string.= "<td> asma </td> ";
}
for($i=0;$i<$rows;$i++)
{
$table_string.= "<tr>";
$table_string.= $column_string."</tr>";
}
$table_string.="</table>";
return $table_string;
}
$noOfProcess = $_POST["noOfProcess"];
$algo = $_POST["algo"];
echo $table_string= Table("noOfProcess",3);