|
Posted by frizzle on 12/29/05 00:36
Oli Filth wrote:
> frizzle said the following on 28/12/2005 20:53:
> > Hi there,
> >
> > I'm trying to filter a big string.
> > For that, i need the opposite of strpos.
> > Strrpos doesn't work with strings as 'needle',
> > i found strripos does accept strings as 'needle',
> > but that's only from PHP 5. I only have Version 4.3.11.
> >
> > Any clues out there?
> >
>
> I guess you could reverse your needle and haystack (strrev()), convert
> them both to lower-case (strtoupper()), use a case-sensitive forward
> search (strpos()), and then convert the return value with some simple
> maths and strlen().
>
> A bit long-winded and inefficient, but should do the job.
>
> --
> Oli
Ok, i get what you mean, i sort of thought of this myself, but i was
hoping there would be a better solution.
My final goal is to copy content of a soccer-webpage, filter it, and
come up with the current score of all the teams.
The scheme is at
http://www.knvb.nl/clubs_comp/?action=teamDetails&ClubName=Hurwenen&NotationDescription=0512%20Mannen%20%20Zondag%20standaard&LevelDescription=5e%20klasse&CompetitionType=0512&ClassLevel=15&RegionCode=KNVB-DISTRICT-ZUID1&Pool=5F&TeamDescription=1
The regarding scheme is the one with "Stand" in the bright orange beam.
What i need is to find 12 appearances of teams from the DB after each
other (in every next line) and then break the lines up into an array
with 10 items in it ...
I hope this makes sense ...
Frizzle.
I have all the teams in the current competition in my DB.
Navigation:
[Reply to this message]
|