How to replace %20 with -. (Wordpress)
So what i need: link like ://www.yyy.xx/tag/55 5/
should change in ://www.yyy.xx/tag/55-5/
instead of: http://www.yyy.xx/tag/55%205/
How to replace %20 with -. (Wordpress)
So what i need: link like ://www.yyy.xx/tag/55 5/
should change in ://www.yyy.xx/tag/55-5/
instead of: http://www.yyy.xx/tag/55%205/
Try using str_replace for that.
like for example.
$url = "http://www.yyy.xx/tag/55%205/";
$url = str_replace('%20', '-', $url);