problem with search |
[eluser]huuray[/eluser]
hi all, looked the forum,google.com,but no luck with search with space "code igniter" Code: function search() when i try to browse http://localhost/user/search/code igniter , it will return code_igniter any idea? sorry for my poor english
[eluser]Simian Studios[/eluser]
Try http://localhost/user/search/code+igniter or http://localhost/user/search/code%20igniter and it should work. At a guess the URI class is automatically converting the invalid space to an undserscore as a default behaviour.
[eluser]huuray[/eluser]
is it ok if i use this ? -> str_ireplace("_"," ",$search_query);
[eluser]Simian Studios[/eluser]
That should work - I would make sure to convert spaces in search queries to underscores first though, just so you know what you're dealing with. Unless people are likely to include underscores in their search queries, in which case you'll need a different character of course..
|
Welcome Guest, Not a member yet? Register Sign In |