On Mar 22, 2004, at 1:46 PM, gordon stewart wrote:
=======
foreach ($text as $color) {
   echo "SAF '$color' - ";
echo "<B>".strlen($color)."</B><BR>\n";
}
=======

QUESTION :-

Is this the right code to use ? to find the length of
each line ? ($color)   - No worries - Ive just copied
code from the web

strlen() is the correct function to use here. Use it like:


echo strlen($_POST['input_name']);

Where $_POST['input_name'] should be replaced by the variable you want to check. strlen() is always right, but it counts the actual charactars of the string (which may differ from those who are shown in the browser, please look at the HTML source instead).

Secondly, please use lowercase for HTML tags and use <br /> instead of <BR>...

Regards,

Filip de Waard

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to