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.
3rd August 2018
© 2018 The Web Taylor Hampshire. Ground Floor, 1000 Lakeside North Harbour, Western Road, Portsmouth, Hampshire, PO6 3EZ