Re: Re: Another stupid one...

From: Date: Thu, 15 Aug 2002 04:13:50 +0000
Subject: Re: Re: Another stupid one...
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-112669@lists.php.net to get a copy of this message
Ahh, I just found the problem... This is the source of the output: <td valign=top align=left>User : liam@i-redlands.net </td> Whoops... Sorry guys. The reason I'm having troubles with all this stuff is that it's all being pulled out of a hard database using telnet. Yeah, it's the only way, and it's a downright pain. Oh well. ----- Original Message ----- From: "Bogdan Stancescu" <mgv@canad.ro> To: <php-general@lists.php.net> Sent: Thursday, August 15, 2002 2:10 PM Subject: [PHP] Re: Another stupid one... Just stop using ereg_replace where not needed and use str_replace instead - it's faster and you don't risk bumping into "key-chars" like you just did. While regexps are very useful when needed, people tend to use the same functions even when they don't need regexps just out of habit... There, now I said it! :-) Bogdan Liam Mackenzie 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 > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#112669) next »