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.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to