Thread
:
whitespace
View Single Post
#
2
(
permalink
)
Sep 22nd, 2007, 10:02
Sagaris
Junior Member
Join Date: Apr 2006
Location: UK
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Re: whitespace
You can use trim to get rid of whitespace at the begining and end of a string
PHP
:
Select all
$nospaces
=
trim
(
$string
);
Or use str_replace to remove whitespace throughout a string
PHP
:
Select all
$nospaces
=
str_replace
(
' '
,
''
,
$string
);
HTH
Sagaris
View Public Profile
Find all posts by Sagaris