In my tag cloud I have urls that look like this
../search.php?query=cat&select=all../search.php?query=the cat&select=all
What I am trying to do is if the keyword is more than one word like so:
../search.php?query=the cat&select=all
Put a + between the words like this
../search.php?query=the+cat&select=all
My default search function uses the + in the searches performed by the form but I would also like my tag cloud to have the same thing. I am only doing this for looks. It works perfectly fine as is but I thought I would ask anyway. Can anyone help? this is what I am currently using for links in my tag cloud
echo " <a href='../search.php?query=$word&select=all' target='rel' title='".($word)."'>".($word)."</a>";
Thanks.
I think what you’re looking for is the urlencode() function.