justlukeyou Posted May 24, 2012 Share Posted May 24, 2012 This may be a basis question but I am stuck on how to use to filter words which have gaps in. With the the 'bedroom' I can use this to filter but with "Dining Room" I am stuck because it has a space in it. I am also echoing the keyword so I cant make dining room as diningroom <a href="/articles/articlefiltered.php?articlecategory=bedroom" rel="nofollow" class='articlesfilterlink'>Bedroom</a> <a href="/articles/articlefiltered.php?articlecategory=dining%room" rel="nofollow" class='articlesfilterlink'>Dining Room</a> Do I use something like this Dining/%Room Quote Link to comment https://forums.phpfreaks.com/topic/263086-using-gaps-in-filter-words-dining-room/ Share on other sites More sharing options...
Drummin Posted May 24, 2012 Share Posted May 24, 2012 Try %20 for space. It should validate for url and give you the value "dining room" to use in your query. Quote Link to comment https://forums.phpfreaks.com/topic/263086-using-gaps-in-filter-words-dining-room/#findComment-1348452 Share on other sites More sharing options...
justlukeyou Posted May 24, 2012 Author Share Posted May 24, 2012 Brilliant, thanks. That worked a treat. Quote Link to comment https://forums.phpfreaks.com/topic/263086-using-gaps-in-filter-words-dining-room/#findComment-1348453 Share on other sites More sharing options...
scootstah Posted May 24, 2012 Share Posted May 24, 2012 You can use rawurlencode and rawurldecode to do everything for you. Quote Link to comment https://forums.phpfreaks.com/topic/263086-using-gaps-in-filter-words-dining-room/#findComment-1348454 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.