Re: Get the string in between two other strings
| From: | Cameron Cooke | Date: | Thu, 17 Oct 2002 12:33:43 +0000 |
| Subject: | Re: Get the string in between two other strings | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-120315@lists.php.net to get a copy of this message | ||
I have looked at these, and they make no sense to me. I tried the substr
function, but it all went a bit pear shaped.
Cameron
"Noodle Snacks" <webmaster@tececo.com> wrote in message
news:20021017112721.37399.qmail@pb1.pair.com...
>
> "Cameron Cooke" <cameron@toucanresolve.co.uk> wrote in message
> news:20021017110141.26610.qmail@pb1.pair.com...
> > Hi,
> >
> > I need a function to get a string in between two other strings. So you
> would
> > give the function the string to search and then you pass the first
string
> > and last string, and the function will return the string in between.
> >
> > Does anyone have this, or know how to do it. I tried but could not get
it
> to
> > work.
>
> will substr() - http://au.php.net/manual/en/function.substr.php
> suit your
> needs?
>
> if not check out:
>
> http://au.php.net/manual/en/ref.regex.php
>
> and
>
> http://au.php.net/manual/en/ref.pcre.php
>
>