With a moment of studying to your comment, I am beginning to see why I am
having the problem.  I add the 9 in the first two lines of code, so I didn't
realize that I would have encounter the problem if I didn't add the 9.
Well, I seem to have problem understanding the word, 'offset' to the
strpos() function because it is a bad choice of word but that is
understandable when I use this function the first time and not understand
it.  Thanks for the clarification...

Scott

"Kelly Hallman" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Fri, 21 Nov 2003, Scott Fletcher wrote:
> > Ah!  Found the problem... It is probably a bug with strpos() because it
> > seem to get stuck in there and couldn't get out of it somehow.  The
> > workaround the problem I did was just easily increment the $HTML_End by
1
> > and that fixed the problem.  It look like this...
>
> You should avoid statements like "_____ doesn't work" (try "I can't get it
> to work" or "it doesn't work for me") and "It's probably a bug with"...
>
> Anyway, strpos() is working exactly like it's supposed to...
> Consider this code:
>
> $t = "** string string string";
> $l = strpos($t,"string"); // $l == 3
>
> Now, if you tell strpos() to start searching at offset 3 for the same
> exact string, it's going to find the same occurence because you're telling
> it to start looking exactly where it found it last time.
>
> So, naturally, you need to advance the character position by at least one
> to find subsequent occurences. This isn't a workaround. You had the bug.
>
> -- 
> Kelly Hallman
> // Ultrafancy

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to