Welcome Guest, Not a member yet? Register   Sign In
why is this always 'no'?
#1
Tongue 

Can anyone tell me why this always executes to 'no'? With the debugger I can clearly see values for $post_array 

if ((empty($post_array->elimination_of_uncertainty)) && (empty($post_array->technological_in_nature)) &&
            (empty($post_array->permitted_purpose)) && (empty($post_array->process_of_experimentation))) {
            $iComplete = 'no';
        } else {

        $iComplete = 'yes';
    }
proof that an old dog can learn new tricks
Reply
#2

They are all empty.

$post_array->elimination_of_uncertainty
$post_array->technological_in_nature
$post_array->permitted_purpose
$post_array->process_of_experimentation

empty is a technical term in PHP.
See https://www.php.net/empty
Reply
#3

show your $post_array value, maybe other method more suitable for checking.
Reply
#4

(This post was last modified: 11-15-2022, 08:44 AM by richb201.)

(11-14-2022, 03:01 PM)kenjis Wrote: They are all empty.

$post_array->elimination_of_uncertainty
$post_array->technological_in_nature
$post_array->permitted_purpose
$post_array->process_of_experimentation

empty is a technical term in PHP.
See https://www.php.net/empty

Yes, that worked. I used
$post_array->elimination_of_uncertainty!=''
instead.

thx
proof that an old dog can learn new tricks
Reply




Theme © iAndrew 2016 - Forum software by © MyBB