Hi there
Im having problem entering something into my database, I need to remove the blank spaces automatically and replace them with '_'
How do I do this?
cheers
Get rid of blank spaces
Moderator: General Moderators
Re: Get rid of blank spaces
Assuming you have the data in a variable called $data the follwoing code will work.
Code: Select all
<?php
$data = str_replace(" ", "_", $data);
?>