CAn someone help me to put an image inside a <table> in php. i have used echo '<table>' function but i did not work form me. it out put some hex codes.
[code=php]
<?php
echo '<table>';
<tr>
<td>
$file='cow.jpg' ;
$src_img = imagecreatefrom jpeg($file);
$srcsize = getimagesize($f ile);
$dest_x = 250;
$dest_y = (250 / $srcsize[0]) * $srcsize[1];
$dst_img = imagecreatetrue color($dest_x, $dest_y);
imagecopyresamp led($dst_img, $src_img, 0, 0, 0, 0,
$dest_x, $dest_y, $srcsize[0], $srcsize[1]);
header("content-type: image/jpeg");
imagejpeg($dst_ img);
</td>
</tr>
echo '</table>';
?>
[/code]
thanks
[code=php]
<?php
echo '<table>';
<tr>
<td>
$file='cow.jpg' ;
$src_img = imagecreatefrom jpeg($file);
$srcsize = getimagesize($f ile);
$dest_x = 250;
$dest_y = (250 / $srcsize[0]) * $srcsize[1];
$dst_img = imagecreatetrue color($dest_x, $dest_y);
imagecopyresamp led($dst_img, $src_img, 0, 0, 0, 0,
$dest_x, $dest_y, $srcsize[0], $srcsize[1]);
header("content-type: image/jpeg");
imagejpeg($dst_ img);
</td>
</tr>
echo '</table>';
?>
[/code]
thanks
Comment