On 10/23/07, Dan Shirah <[EMAIL PROTECTED]> wrote:
>
> I made two variables for the same posted value because I believe empty()
> does not work with strtoupper in front of the value. It only works with a
> standalone variable, correct?


no; strtoupper modifies its argument, that is all.
empty evaluates the argument it is given that is all.
therefore, if empty is passed an string with no contents that has been
passed through
strtoupper, it will still be regarded as empty.

<?php
    $var = strtoupper('');
     if(empty($var)) { echo 'var is empty'; }
?>

When comments is left blank and I echo out the value for $check_comments it
> returns nothing at all which is why I think empty() or "" should work, but
> they don't.


try using var_dump(); you will see that it is a string that has no contents,
or perhaps some
whitespace characters.

-nathan

Reply via email to