Re: counting chars, if statement

From: Date: Thu, 17 Aug 2000 09:25:36 +0000
Subject: Re: counting chars, if statement
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-12189@lists.php.net to get a copy of this message
Marcel Schwarz wrote: > > 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. > Hi Marcel, I think the point it that it should of course output "... value is not 5", but in fact it's outputting nothing and that's the problem. Greetings (und Grüße aus Darmstadt ;-)) Martin > > Marcel. > > --- > -------------------------------------------------- > die mikan homepage: http://www.mikan.de > > m.schwarz@mikan.de > > PGP-Fingerprint > 1CDB E6DC 02CC 0347 C77C D8E9 709B 468A 3FAB D3CA > -------------------------------------------------- > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#12189) next »