Re: Another stupid one...
| From: | Justin French | Date: | Thu, 15 Aug 2002 04:28:05 +0000 |
| Subject: | Re: Another stupid one... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-112673@lists.php.net to get a copy of this message | ||
For starters, use str_replace() because you've got nothing that needs the
overhead of ereg. The : is a key character too, which is creating your
problem.
$results = str_replace('User :', '', $results);
Justin French
on 15/08/02 1:59 PM, Liam MacKenzie (phplist@operationenigma.com) wrote:
> Hey all, got another dumb question :-)
>
> Output text is as follows:
>
> User : liam@i-redlands.net
>
> I do this:
> $results = ereg_replace("User :", '', $results);
>
> I get this:
> User : liam@i-redlands.net
>
> But when I do this:
> $results = ereg_replace("User", '', $results);
>
> I get this:
> : liam@i-redlands.net
>
> How do I remove the whole "User :" without removing all the damn colons?
>
> Cheers,
> Liam
>
>
>