Hi,
I want to print a drop down of the number at the run time basis on certain calculation.
print "<table width='97%' border='0'>
<tr><td>Date Range ". $checkin. " to ". $checkout ."</td></tr>";
$room_type_arr=array();
$vac_arr=array();
while ($row_room=mysql_fetch_array($result_room)) {
$sql_vacant="SELECT * FROM roomtype WHERE roomtype='" . $row_room['type_of_rooms'] ."' AND idhotel=".$hotelid;
$result_vacant=mysql_query($sql_vacant,$link);
$row_vacant=mysql_fetch_array($result_vacant);
$vacant=$row_vacant['numberofroom']-$row_room['filledroom'];
$vac_arr[]=$vacant;
if (!in_array($row_room['type_of_rooms'],$room_type_arr)){
print "<tr>
<td class='text' >Types of rooms : ". $row_room['type_of_rooms'] .
"<input name='rdoRoomType' type='radio' value='room_type'>
</td>
<td >Number of rooms <select>
<option value='1'>1</option>
</select></td>
</tr>";
$room_type_arr[]=$row_room['type_of_rooms'];
} // end of if to check , whether the room type is different
} // end of while;
print_r($vac_arr);
print "</table>";
I am storing vacant record in array $vac_arr. But it is storing value for all type of room.
If there is more then one type of room then this , how can i print it with each room type.
Thanks in advance.