I have
$string = "This is my string ";
How do i remove white spaces from the string .
I want $string = Thisismystring
How do i remove white spaces
Thanks Chanderjit
Hi! Try this: $string_without_spaces = ereg_replace(" ", "", $string_with_spaces);
It should work fine for you.
Since what you're trying to get rid of is a space, I'd use str_replace instead.
The manual says: If you don't need fancy replacing rules, you should always use this function instead of ereg_replace() or preg_replace().
It's probably faster.
Hehe, it works ,-)) Tnx for the correction.