echo " </tr>\n";
echo " <tr>\n";
echo " <td class=\"hotelinfotext\">
if ($row[NonSmoking] == 1) {
echo 'Non smoking rooms available, ';
}
if ($row[AirCon] == 1) {
echo 'Air conditioning, ';
}
if ($row[Restaurant] == 1) {
echo 'Restaurant, ';
}
</td>\n";
echo " </tr>\n";
You are echoing you "code" a one big long string. Do this:
echo " </tr>\n";
echo " <tr>\n";
echo " <td class=\"hotelinfotext\">";
if ($row[NonSmoking] = 1) {
echo 'Non smoking rooms available, ';
}
if ($row[AirCon] = 1) {
echo 'Air conditioning, ';
}
if ($row[Restaurant] = 1) {
echo 'Restaurant, ';
}
echo "</td>\n";
echo " </tr>\n";
BTW, is it actually legal to call
$array[name] instead of
$array['name'] ? I was under the impression that you needed quotes (going off examples I have seen. That's how I learnt).
Reputation Points: 20
Solved Threads: 13
Junior Poster in Training
Offline 93 posts
since Oct 2005