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