gple Posted May 27, 2007 Share Posted May 27, 2007 I am trying to output an image with text coming from a database" $image=mysql_result($result,$i,"image"); trying to output it like this: <img src=../prod_images/" . $image . " height=90> problem is that some images have a space in the text like "image 1". When it is outputted onto the screen, the browser does not read anything after the space. How can I get around this? Quote Link to comment https://forums.phpfreaks.com/topic/53196-ouput-image/ Share on other sites More sharing options...
gabeg Posted May 27, 2007 Share Posted May 27, 2007 you need to have quotes around the image path if there are spaces. you should get into the habit of putting quotes around any attribute though. $image=mysql_result($result,$i,"image"); trying to output it like this: <img src=\"../prod_images/" . $image . "\" height=\"90\"> Quote Link to comment https://forums.phpfreaks.com/topic/53196-ouput-image/#findComment-262826 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.