Re: [PHP] Getting false positive on strpos ... despite doublecheck... HELP!

2003-03-18 Thread -{ Rene Brehmer }-
On Tue, 18 Mar 2003 01:50:57 -0800 (PST), Rasmus Lerdorf wrote about "Re: [PHP] Getting false positive on strpos ... despite doublecheck... HELP!" what the universal translator turned into this: >> Do they cause the same behaviour as an if ... elseif structure??? > >Yes, co

Re: [PHP] Getting false positive on strpos ... despite doublecheck... HELP!

2003-03-18 Thread -{ Rene Brehmer }-
On Mon, 17 Mar 2003 13:14:46 -0700, Kevin Stone wrote about "Re: [PHP] Getting false positive on strpos ... despite doublecheck... HELP!" what the universal translator turned into this: >> It interprets the text correctly 100%, BUT I get a false positive date >> check

Re: [PHP] Getting false positive on strpos ... despite doublecheck...HELP!

2003-03-18 Thread Rasmus Lerdorf
> Do they cause the same behaviour as an if ... elseif structure??? Yes, continue simply discards the rest of the statements inside a loop and goes to the next iteration. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Getting false positive on strpos ... despite doublecheck... HELP!

2003-03-18 Thread -{ Rene Brehmer }-
On Mon, 17 Mar 2003 05:40:05 -0800 (PST), Rasmus Lerdorf wrote about "Re: [PHP] Getting false positive on strpos ... despite doublecheck... HELP!" what the universal translator turned into this: >> case strpos($line,"#date:") == 0 && strpos($line,"#

Re: [PHP] Getting false positive on strpos ... despite doublecheck...HELP!

2003-03-17 Thread Rasmus Lerdorf
> case strpos($line,"#date:") == 0 && strpos($line,"#date:") !== false: You can just do a === 0 check here, you don't need the second check to make sure it isn't false. However, that's not really how you use a switch expression anyway. The expressions in the case statement should be con

Re: [PHP] Getting false positive on strpos ... despite doublecheck... HELP!

2003-03-17 Thread Kevin Stone
- Original Message - From: "-{ Rene Brehmer }-" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, March 17, 2003 12:54 PM Subject: [PHP] Getting false positive on strpos ... despite doublecheck... HELP! > Hi y'all > > I'm working on th

[PHP] Getting false positive on strpos ... despite doublecheck... HELP!

2003-03-17 Thread -{ Rene Brehmer }-
Hi y'all I'm working on the read function for my guestbook, but I'm getting a false positive on the check for the date string. It reads a text file, checks for line headers, and then writes the HTML according to what it finds ... really simple, and works beautifully, except that I get an extra dat