RE: [PHP] (Newbie) String within a string

2001-01-19 Thread Chris Hayes
ot; [EMAIL PROTECTED] To: "PHP" [EMAIL PROTECTED] Date sent: Thu, 18 Jan 2001 16:12:31 - Subject: RE: [PHP] (Newbie) String within a string Excellent, thanks a lot Chris. Steve (jalist) [EMAIL PROTECTED] http://ls2k.org -Original Message- Fr

Re: [PHP] (Newbie) String within a string

2001-01-19 Thread Angus Mann
At 13:48 18/01/01 +, jalist wrote: I'm trying to grab a string from within a string based on a matching word or phrase. Example... $string = "This is a string I need to grab the middle out of" $query_word = "need" I need to get x amount of characters either side of $query_word, so the

[PHP] (Newbie) String within a string

2001-01-18 Thread jalist
I'm trying to grab a string from within a string based on a matching word or phrase. Example... $string = "This is a string I need to grab the middle out of" $query_word = "need" I need to get x amount of characters either side of $query_word, so the result string would be like... "string I

Re: [PHP] (Newbie) String within a string

2001-01-18 Thread Chris Hayes
jalist: I'm trying to grab a string from within a string based on a matching word or phrase. Example... You say you want the middle, not two words before and two words after. I see several ways. 1. Explode into an word-array and use that: 1. prepare string

RE: [PHP] (Newbie) String within a string

2001-01-18 Thread jalist
Excellent, thanks a lot Chris. Steve (jalist) [EMAIL PROTECTED] http://ls2k.org -Original Message- From: Chris Hayes [mailto:[EMAIL PROTECTED]] Sent: 18 January 2001 15:43 To: jalist; PHP Subject: Re: [PHP] (Newbie) String within a string jalist: I'm trying to grab a string from