[PHP] Re: How do I do this select?

2004-01-11 Thread Manuel Vázquez Acosta
select distinct user.userId, fu.UserID as FriendID, fu.Name as FriendName from user, friendlist as f, user as fu where f.userkey = user.userkey and f.friendkey = fu.userkey order by user.userId, friendId; "Chris W" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I sent this to

RE: [PHP] Re: How do I do this

2001-12-13 Thread Philip Hallstrom
Probably something like this... $str = "[hi] there, this is me [HI][HI] there, this is me"; $newstring = ereg_replace("(\[[A-Z]*][^]])", "\\1", $str); I'm not sure if the "[^]]" should be "[^\]]" or not, but that might work. If it doesn't you could always do: $str = "[hi] there, this is me [HI]

[PHP] Re: How do I do this

2001-12-13 Thread Jeff Warrington
In <[EMAIL PROTECTED]>, Chris Boget wrote: Either of these should work: $str = preg_replace("/(\[[A-Z]+\])/","\\1",$str); $str = ereg_replace("(\[[A-Z]+\])","\\1",$str); e.g.: \\1",$str); //$str = ereg_replace("(\[[A-Z]+\])","\\1",$str); print("$str"); ?> Jeff Warrington > I've got the fo

RE: [PHP] Re: How do I do this

2001-12-13 Thread Boget, Chris
> This is untested, but something like... > $str = "[hi] there, this is me [HI] there, this is me"; > $newstring = ereg_replace("(\[[A-Z]*])", "\\1", $str); > should do it. > using the Perl regexe's might make it easier, but that should work. That worked perfectly. Is there any way I can make it

[PHP] Re: How do I do this

2001-12-13 Thread Philip Hallstrom
This is untested, but something like... $str = "[hi] there, this is me [HI] there, this is me"; $newstring = ereg_replace("(\[[A-Z]*])", "\\1", $str); should do it. using the Perl regexe's might make it easier, but that should work. On Thu, 13 Dec 2001, Boget, Chris wrote: > I've got the fol