<th> and <td> not aligning!

Hi All,

I have a table which gets data from my database. The table is made from html and php.

			<table width="100%" border="1" cellpadding="1" cellspacing="1">
			<tr>
			<th>Make</th>
			<th>Model</th>
			<th>Price</th>
			<th>Date Registered</th>
			<th>Milage</th>
			<th>Fuel Type</th>
			<th>Engine Size</th>
			<th>Gearbox</th>
			<th>Doors</th>
			<th>Seats</th>
			<th>Colour</th>
			</table>			

[php]
while($vehicle = mysqli_fetch_assoc($row)){
echo “”;
echo “”.$vehicle[‘make’]."";
echo “”.$vehicle[‘model’]."";
echo “”.$vehicle[‘price’]."";
echo “”.$vehicle[‘regDate’]."";
echo “”.$vehicle[‘milage’]."";
echo “”.$vehicle[‘fuelType’]."";
echo “”.$vehicle[‘engineSize’]."";
echo “”.$vehicle[‘gearbox’]."";
echo “”.$vehicle[‘doors’]."";
echo “”.$vehicle[‘seats’]."";
echo “”.$vehicle[‘colour’]."";
echo “”;
}

[/php]

I’ve attached a photo of what the table is displaying as.

Thanks,
Jack


Might want to keep your table open, if you plan on adding to it.

Moved the tag to the bottom of the php and its worked - cheers [member=72272]astonecipher[/member] !

Sponsor our Newsletter | Privacy Policy | Terms of Service