Page 3 of 3
Posted: Thu Jun 28, 2007 5:49 am
by volka
Last try: Why does this script
Code: Select all
for($i=0; $i<10; $i++) {
}
echo $i;
print 10 instead of 0 1 2 3 4 5 6 7 8 9?
Your script has the same problem.
Posted: Thu Jun 28, 2007 6:25 am
by ghadacr
OH OK....now i get it, it looks like one of those homer times...DOH.........
One more thing can you just show me where to put the curly brackets because i keep on getting infintate loops, or outputs a indivdual form for each record... Thanks Volka....
Posted: Thu Jun 28, 2007 7:09 am
by volka
You currently have
Code: Select all
if(isset($_GET['HotelRoomID']))
{
foreach($_GET['HotelRoomID'] as $k=>$k1)
{
mssql_query();
mssql_num_rows();
}
}
$i=0;
while ($i < $count) {
mssql_fetch_array();
}
You probably want
Code: Select all
if(isset($_GET['HotelRoomID']) && is_array($_GET['HotelRoomID']) )
{
foreach($_GET['HotelRoomID'] as $k=>$k1)
{
mssql_query();
mssql_num_rows();
$i=0;
while ($i < $count) {
mssql_fetch_array();
}
}
}