Replacing Spaces with Underscores

$name = str_replace(' ', '_', $name);

Leave a Comment