Raiso Posted January 18, 2009 Share Posted January 18, 2009 Hi guys, I have a little qeustion. I have a picture on my ftp it called "FC Twente.png" and as you can see there is a space in the name. Now i want to load that picture from a code Like: if($r['club'] == "FC Twente") { $clubpic="FC Twente.png"; } but this doesn't work, because then he load only FC And I have triet to but it don't work to. Normaly I just change the picture name but it are 750 picture's so I hope someone can help me. Thnx. Grtz, Raiso Quote Link to comment Share on other sites More sharing options...
DeanWhitehouse Posted January 18, 2009 Share Posted January 18, 2009 str_replace(" ","",$r['club']); That will remove the space e.g. if(str_replace(" ","",$r['club']) == "FCTwente") $clubpic="FC Twente.png"; Quote Link to comment Share on other sites More sharing options...
Raiso Posted January 18, 2009 Author Share Posted January 18, 2009 no you don't get the question. There is a space in FC Twente.png But if i just typ <img src=FC Twente.png> he just load http://www.mysite.com/FC and it has to load http://www.mysite.com/FC Twente.png Quote Link to comment Share on other sites More sharing options...
dawsba Posted January 18, 2009 Share Posted January 18, 2009 i've just tried and it works fine..... what is $r['club'] can you echo that please Quote Link to comment Share on other sites More sharing options...
Raiso Posted January 18, 2009 Author Share Posted January 18, 2009 I already have it Just %20 haha Thnx anyway guys you all Quote Link to comment 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.