gple Posted December 18, 2007 Share Posted December 18, 2007 Here is my code <td><img src=\"../prod_images/" . $image . "\" height=90><br>".$image."</td> $image=WEB 100% Cashmere Sweater 001resizedcashmere.jpg Here is my output http://mensfashiondirect.com/prod_images/WEB%20100%%20Cashmere%20Sweater%20001resizedcashmere.jpg and the image is not showing up properly because of the '%' character in. any way around this. Quote Link to comment https://forums.phpfreaks.com/topic/82124-solved-ouput/ Share on other sites More sharing options...
phpretard Posted December 18, 2007 Share Posted December 18, 2007 Can you use uderscores instead of spaces? WEB_100%_Cashmere_Sweater_001resizedcashmere.jpg Quote Link to comment https://forums.phpfreaks.com/topic/82124-solved-ouput/#findComment-417333 Share on other sites More sharing options...
gple Posted December 18, 2007 Author Share Posted December 18, 2007 I can but I would like to have the spaces. Quote Link to comment https://forums.phpfreaks.com/topic/82124-solved-ouput/#findComment-417334 Share on other sites More sharing options...
~n[EO]n~ Posted December 18, 2007 Share Posted December 18, 2007 I think rawurlencode will help Quote Link to comment https://forums.phpfreaks.com/topic/82124-solved-ouput/#findComment-417354 Share on other sites More sharing options...
gple Posted December 18, 2007 Author Share Posted December 18, 2007 This does not work. It adds pluses where the spaces are. Any other way I have coded it, I get % where spaces are. I dont need those. Quote Link to comment https://forums.phpfreaks.com/topic/82124-solved-ouput/#findComment-417626 Share on other sites More sharing options...
haku Posted December 18, 2007 Share Posted December 18, 2007 I got a 400 error so I couldn't see your output. But you have to add "echo" to the start of that image statement. Quote Link to comment https://forums.phpfreaks.com/topic/82124-solved-ouput/#findComment-417635 Share on other sites More sharing options...
rajivgonsalves Posted December 18, 2007 Share Posted December 18, 2007 rawurlencode should work try $image = rawurlencode($image); echo "<td><img src=\"../prod_images/" . $image . "\" height=90> ".$image."</td>"; Quote Link to comment https://forums.phpfreaks.com/topic/82124-solved-ouput/#findComment-417636 Share on other sites More sharing options...
rajivgonsalves Posted December 18, 2007 Share Posted December 18, 2007 or better still if u getting image as a paramter $image = rawurlencode(urldecode($image)); Quote Link to comment https://forums.phpfreaks.com/topic/82124-solved-ouput/#findComment-417639 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.