On Sun, 28 Aug 2005 13:41:34 +0200, Hanjo Grüßner <ha***@gruessner.de>
wrote:
Hello,
I'm doing like this:
if (strlen($Name_vor) > 0)
echo '</table></fieldset>';
But the program never goes into the 'echo' branch.
I tried to get strlen($Name_vor) before the condition and it is definivly 0
From te manual strlen returns an INT.
What is wrong ??
TIA
Hanjo
If you're just checking that $Name_vor has a length (and, thus, that it
exists) can you not go -
if ($Name_vor) do_such_and_such;
Have you had a look at
www.php.net/strlen ? One of the contributions there
helped me solve a problem -
QUOTE
Beware: strlen() counts new line characters at the end of a string, too!
$a = "123\n";
echo "<p>".strlen($a)."</p>";
The above code will output 4.
UNQUOTE