Answers for "php replace space and dash with underscore"

PHP
4

php replace space with underscore

$str = str_replace(' ', '_', $str);
Posted by: Guest on July-14-2020
2

php replace spaces with dash

str_replace(' ', '-', $string);
Posted by: Guest on May-21-2020

Code answers related to "php replace space and dash with underscore"

Browse Popular Code Answers by Language