str_replace is a very simple PHP function. It replaces chosen characters in a string.
$a = "this is a sentence";
$b = str_replace(" ", '_', $a);
The above code will replace all the spaces in the sentence with underscores.
25th July 2017
© 2017 The Web Taylor Hampshire. Ground Floor, 1000 Lakeside North Harbour, Western Road, Portsmouth, Hampshire, PO6 3EZ