Re: more on trimming
| From: | Christian Reiniger | Date: | Sat, 17 Feb 2001 14:06:01 +0000 |
| Subject: | Re: more on trimming | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-40330@lists.php.net to get a copy of this message | ||
On Saturday 17 February 2001 09:16, jaskirat wrote:
> $var = "This is a variable ";
>
> Now I want to strip off white spaces on the end without losing them in
> the middle of the sentence ..
>
>
> I had figured that there is a no direct way of doing it and some thing
> like this
> works
> $var = trim (ereg_replace(" ","",$var));
*ack*
Why not just
$var = trim ($var);
?
Try it. It works :)
--
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)
Drink wet cement. Get stoned.