Don't complicate your code if you don't need it. IF you need to find out the
length of the string, use PHP's built-in functions. They're faster and they
are easier to write, debug and for others to understand. If I missed your
point completely, forgive me.

And here's the code for you do figure out your problem.

if (strlen($string) > 20){
    print "error";
} else {
    print "OK";
}


Adam


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

Reply via email to