How would I go about altering my string from
user name
to
user_name
?
changing whitespace to underscore
Moderator: General Moderators
- elecktricity
- Forum Contributor
- Posts: 128
- Joined: Sun Sep 25, 2005 8:57 pm
- Location: Trapped in my own little world.
- Contact:
make sure it's in a variable and do this:
Code: Select all
<?PHP
$msg = str_replace(" ", "_", $msg);
?>