I’ve tried using rawurlencode and urlencode, both give me “&” and the other “+”.
What i’m asking is, is there a PHP function that puts “-” in between words, like on Stack Overflow?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If thats all you’re trying to do, you could just use:
And then use
urlencodeto encode it after that. E.G.:EDIT
And according to the PHP manual, it replaces
all non-alphanumeric characters except -_. with a percent (%) sign followed by two hex digits and spaces encoded as plus (+) signs.