Hi all,
I am sorry to ask such a stupid question, but I must.
Formatting text into rows and cols.
If I have a table and I want it to have x rows and 3 cols and I want the second cols to be empty (which gives me space between descriptive names for rows and the data) how do I do it.
I know I am new to PHP but I have no problems doing this in HTML. Why or am I doing this completely wrong.
Example:
echo " <table width=100% border=0 cellspacing=0 cellpadding=0>";
echo "<tr>";
echo "<td align=left valign=top><font face=arial size=-6 color=red>Your awards</font></td>";
if ($row["rating"] == "1")
echo "<td align=\"left\"background=\"../../Gif/Background.gif\"><img src=\"".$var1."\"</td>";
elseif ($row["rating"] == "2")
echo "<td align=\"left\"background=\"../../Gif/Background.gif\"><img src=\"".$var2."\"</td>";
elseif ($row["rating"] == "3")
echo "<td align=\"left\"background=\"../../Gif/Background.gif\"><img src=\"".$var3."\"</td>";
elseif ($row["rating"] == "4")
echo "<td align=\"left\"background=\"../../Gif/Background.gif\"><img src=\"".$var4."\"</td>";
elseif ($row["rating"] == "5")
echo "<td align=\"left\"background=\"../../Gif/Background.gif\"><img src=\"".$var5."\"</td>";
echo "</tr>";
echo "<tr>";
echo "<td align=left><font face=arial size=-6 color=red>Name</font></td>";
echo "<td>".$row["name"] . "</td>";
echo "</tr>";
echo "<tr>";
echo "<td align=left valign=top><font face=arial size=-6 color=red>Description</td>";
echo "\t<td>".$row["descript"] ."</font></td>";
echo "</tr>";
echo "<tr>";
echo "<td align=left><font face=arial size=-6 color=red>Address</td>";
echo "<td> ".$row["street"]. "</font></td>";
echo "</tr>";
echo "<tr>";
echo "<td align=left><font face=arial size=-6 color=red></td>";
echo "<td>".$row["suburb"]."</font></td>";
echo "</tr>";
echo "<tr>";
echo "<td align=left><font face=arial size=-6 color=red></td>";
echo "<td>".$row["town"]."</font></td>";
echo "</tr>";
echo "<tr>";
echo "<td align=left><font face=arial size=-6 color=red></td>";
echo "<td>".$row["county"]."</font></td>";
echo "</tr>";
echo "<tr>";
echo "<td align=left><font face=arial size=-6 color=red></td>";
echo "<td>".$row["postcode"]."</font</td>";
echo "</tr>";
echo "<tr>";
echo "<td align=left><font face=arial size=-6 color=red></td>";
echo "<td>".$row["tel"]."</font></td>";
echo "</tr>";
echo "<tr>";
echo "<td align=left><font face=arial size=-6 color=red></font></td>";
echo "<td>".$row["fax"]."</td>";
echo "</tr>";
echo "<tr>";
echo "<td align=left><font face=arial size=-6 color=red>E-mail</td>";
echo "<td>".$row["email"]."</font></td>";
echo "</tr>";
echo "<tr>";
echo "<td align=left><font face=arial size=-6 color=red></font></td>";
echo "</tr>";
echo "<tr>";
Here I have rows with decsriptive names followed by the data output. Yes it works but it looks a mess on screen.
Forgive my lack of knowledge.
Many thanks in advance
If you want to see what I am talking about take a look at the following:
www.travellingtoengland.co.uk
select ACCOMODATION, HOTELS and chose the Welcome Hotel at the bottom of the list.
DCJ