Help about Table in HTML

Hello php gurus… I am new in html and php. My problem is about how to put an image in a table. Actually i was able to put it in a table but the problem here is the order of it in the table since i cannot put the second image in the second row instead it goes side by side with the first image every row. Sorry for my english.

Any help would be greatly appreciated.

[php]
//READ ALL POSTS
$records = read_(0);

?>
<table style="width:100%; border: 1px solid #b7ddf2; background-color: black;">	
<tr style='background-color: #A00000; height: 30px;'>
	<th>Team</th>
	<th>vs</th>
	<th>Team</th>
	<th>Date</th>
	<th>Venue</th>
	<th>Channel</th>
	<th width='100px'></th>
</tr>
<?php

$count=0;
$style1="style= 'background-color: blue'";
$style2="style= 'background-color: blue'";

//DISPLAY ALL POSTS
while ($record = mysql_fetch_array($records)) {
	if ($count%2==0)
		$style = $style1;
	else
		$style = $style2;
		
	echo "<tr $style>";
	echo "<td><image src ='heat logo.jpg'/> <image src ='heat logo2.jpg'/></td>"; //problem here
	echo "<td width ='30px'></td>";
	echo "<td width ='160px'><img src ='knicks logo.jpg'/></td>";
	echo "<td>".$record['date']."</td>";
	echo "<td>".$record['venue']."</td>";
	echo "<td>".$record['channel']."</td>";
	echo "<td width='120px'><a href='edit.php?id=".$record["id"]."' class='button2'>edit</a> <a href='delete.php?id=".$record["id"]."' class='button2'>delete</a> </td>";		
	echo "</tr>";
	$count++;
}
?>
</table>	

[/php]

Hi shadowbudz,

Try changing:

echo "<td><image src ='heat logo.jpg'/> <image src ='heat logo2.jpg'/></td>";

To:

echo "<td><image src ='heat logo.jpg'/></td>"; echo "<td><image src ='heat logo2.jpg'/></td>";

Hope this helps…

William

Hi William,

Tnx for the help, it actually worked but i already tried that and the image (heat logo2) went to the

vs instead of following first heat logo. Actually the first heat logo is repeating in the first Team until it occupies all the rows, thats also one of my problems. I know its quite confusing the way i explain but i don’t know how to post image here so you can see my site, hope you get my point.

Anyway tnx for the help, really appreciate it.

Shadowbudz

Hi Shadowbudz,

Sorry, I don’t fully understand your question.

You could insert your table using the ‘table’ icon to the left of the ‘code’ icon and see if that helps.

Hope this helps…

William

Hi William

Here is the image of my table before the change

http://imageshack.us/a/img571/4968/imagexf.png

now if i use another echo it just goes to the next column, making my table a mess
here is the image

http://img442.imageshack.us/img442/1731/image2io.png

echo "

;
echo ";

Hi Shadowbudz,

Sorry, I don’t know. Maybe an Expert PHP Helper could help you. :-[

I’m sorry, I couldn’t help you. :-[

William

Sponsor our Newsletter | Privacy Policy | Terms of Service