RE: [PHP] counting chars, if statement

From: Date: Thu, 17 Aug 2000 09:23:06 +0000
Subject: RE: [PHP] counting chars, if statement
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-12188@lists.php.net to get a copy of this message
> Hello! > I have a small problem with the if-statement on the below example. Why > doesn't this work? I've also tried ($out != "5") but it won't display > anything. > Also tried "==", "<", ">".... What am i doing wrong? > > $string = "abcdefghijkl"; > $out = strlen($string); > if ($out != 5) { echo "... value is not 5"; } what result did you expect ? in this example your program will echo "... value is not 5" because $out=12. Marcel. --- -------------------------------------------------- die mikan homepage: http://www.mikan.de m.schwarz@mikan.de PGP-Fingerprint 1CDB E6DC 02CC 0347 C77C D8E9 709B 468A 3FAB D3CA --------------------------------------------------

« previous php.general (#12188) next »