RE: [PHP] removing characters from beginning of string
| From: | Maciek Uhlig | Date: | Tue, 11 Jul 2000 20:07:56 +0000 |
| Subject: | RE: [PHP] removing characters from beginning of string | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-5999@lists.php.net to get a copy of this message | ||
The original poster delivered the string and wanted the first comma to be
removed. The first comma was at the beginning of the string. There's no
reason to assume the first comma could be anywhere. It simply was at the
beginning.
Maciek
> -----Original Message-----
> From: Craig Vincent [mailto:webmaster@webdream.com]
> Sent: Tuesday, July 11, 2000 9:58 PM
> To: billzeller@yahoo.com; Jason Bryner; PHP General
> Subject: RE: [PHP] removing characters from beginning of string
>
>
>
> > --- Jason Bryner <jason@focusdesigngroup.com> wrote:
> > > I have the following string and I need to remove the
> > > first comma and leave
>
> > $new_string = ereg_replace("^,", "", $string);
>
> That would not work...that would require the comma being at the
> beginning of
> the string...which is not what the original poster asked for.
> The original
> poster just wants the first comma removed...there's no indication
> where this
> comma will reside in the string.