Re: First stupid post of the year.
| From: | Wolf | Date: | Wed, 02 Jan 2008 20:16:54 +0000 |
| Subject: | Re: First stupid post of the year. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-266520@lists.php.net to get a copy of this message | ||
---- tedd <tedd.sperling@gmail.com> wrote:
> At 1:25 PM -0600 1/2/08, Jack Mays wrote:
> >>>
> >>>>On Jan 2, 2008 1:34 PM, tedd <tedd@sperling.com> wrote:
> >>>from this:
> >>>
> >>> A
> >>>
> >>>
> >>>to this A
> >
> >Read the docs for trim, you can't use it inline with other
> >functions, it will not trim the input. you have to seperate it out,
> >e.g.:
> >
> > $submit = str_replace(' ','',$submit);
> > $submit = trim($submit);
>
> But, that still doesn't work.
>
> Go from here:
>
> A
>
> to here:
>
> A
>
> Cheers,
>
> tedd
> --
> -------
> http://sperling.com
> http://ancientstones.com
> http://earthstones.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
$string=" A
";
$string=str_replace(" ","",$string);
$string=ltrim(rtrim($string)));
echo "The string is now:$string\n";
Outputs:
The string is now:A
Wolf