I try to covert normal English text to url path.
For example
this is a text!
->this-is-a-text
this is a text&image
->this-is-a-text-image
are you ok?
->are-you-ok
So I try convert it with this code:
str_replace("-", "+", urlencode(trim($text)));
It doesn't covert +
to -
Also it seems that doesn't work good for example for '/' and '&' (for some string dosn't work.)
Is there a better way?