Bug #2150 Updated: String comparison

From: Date: Sat, 04 Sep 1999 22:41:10 +0000
Subject: Bug #2150 Updated: String comparison
Groups: php.dev 
Request: Send a blank email to php-dev+get-10566@lists.php.net to get a copy of this message
ID: 2150 Updated by: riffraff Reported By: tri_kar@hotmail.com Status: Closed Bug Type: Parser error Assigned To: Comments: remember, that file() leaves the '\n''s at the end of the string! so if garbagewords.txt contains: riff raff $gar[0] is "riff\n" and $gar[1] is "raff\n", which isn't equal to "riff" or "raff". see manual of chop() to solve your problem. also notice, that if $a and $b are strings and $a=$b, than strlen($a)=strlen($b). you haven't to check it explicitelly. if this wasn't your problem, write me or report another bug. Full Bug description available at: http://bugs.php.net/?id=2150

« previous php.dev (#10566) next »