Re: Is there a way to use the strpos() for next string...
| From: | Scott Fletcher | Date: | Thu, 20 Nov 2003 17:38:34 +0000 |
| Subject: | Re: Is there a way to use the strpos() for next string... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-170449@lists.php.net to get a copy of this message | ||
How exactly does the 3rd parameter option work. I tried this but it doesn't
work, so I don't know how exactly does it work... There isn't detail
information on the php.net website...
--snip--
$XML_Start = (strpos($res_str,"<![CDATA[",1)+9);
$HTML_Start = (strpos($res_str,"<![CDATA[",2)+9);
$HTML_End = strpos($res_str,"]]>",1);
$XML_End = strpos($res_str,"]]>",2);
--snip--
Scott
"Mike Ford" <M.Ford@lmu.ac.uk> wrote in message
news:841D90E489448A4F804E1D1B95768BF7D462B2@lis-exchange3.lmu.ac.uk...
> On 20 November 2003 14:53, Scott Fletcher wrote:
>
> > Hi Everyone!
> >
> > Is there a way to get the strpos() to find the next needle in
> > the haystack instead of just the 1st one only? (Where the 1st
> > needle is the same string as the next needle)...
>
> Look at the optional 3rd parameter to strpos().
>
> Cheers!
>
> Mike
>
> ---------------------------------------------------------------------
> Mike Ford, Electronic Information Services Adviser,
> Learning Support Services, Learning & Information Services,
> JG125, James Graham Building, Leeds Metropolitan University,
> Beckett Park, LEEDS, LS6 3QS, United Kingdom
> Email: m.ford@leedsmet.ac.uk
> Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211