ondi Posted December 18, 2008 Share Posted December 18, 2008 I know my code works as it displays the correct image. However, when i put the code inside a table cell the picture wont show. Can anyone see where I'm going wrong? Here's my code: <TABLE WIDTH="520" ALIGN=center BORDER=0 CELLSPACING=0 CELLPADDING=0> <tr VALIGN=left ALIGN=center> <td> <?php $image_url = "images/" . $playerdata['id'] . ".jpg"; ?> </td></tr></table> Quote Link to comment https://forums.phpfreaks.com/topic/137505-php-image-within-table/ Share on other sites More sharing options...
RichardRotterdam Posted December 18, 2008 Share Posted December 18, 2008 thats what image tags are for <img src="<?php echo $yourImageUrl ?>" /> Quote Link to comment https://forums.phpfreaks.com/topic/137505-php-image-within-table/#findComment-718599 Share on other sites More sharing options...
RussellReal Posted December 18, 2008 Share Posted December 18, 2008 lol kat I came here and I was like.. he prolly generated a php image than probably tried to put the PHP code inside the TABLE lol.. but idk but for any affect, you can't generate an image with any stray data, or it ruins the image.. just fyi Quote Link to comment https://forums.phpfreaks.com/topic/137505-php-image-within-table/#findComment-718601 Share on other sites More sharing options...
ondi Posted December 18, 2008 Author Share Posted December 18, 2008 Hi Kat, i now get this error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/fhlinux222/w/walthamforest-fc.co.uk/user/htdocs/stats/newplayer.php on line 115 My image isn't standard for every page, it's relative to the playerid. Quote Link to comment https://forums.phpfreaks.com/topic/137505-php-image-within-table/#findComment-718624 Share on other sites More sharing options...
RichardRotterdam Posted December 18, 2008 Share Posted December 18, 2008 can you show the code you have so far. While error messages are very helpful to determine what is causing the problem people here can't solve the problem with just the error. Quote Link to comment https://forums.phpfreaks.com/topic/137505-php-image-within-table/#findComment-718628 Share on other sites More sharing options...
ILMV Posted December 18, 2008 Share Posted December 18, 2008 Would you care to show us your code and identify what is line 115? Quote Link to comment https://forums.phpfreaks.com/topic/137505-php-image-within-table/#findComment-718630 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.