check if variable empty

前端 未结 12 1297
旧时难觅i
旧时难觅i 2020-11-27 14:00
if ($user_id == NULL || $user_name == NULL || $user_logged == NULL) {
    $user_id = \'-1\';
    $user_name = NULL;
    $user_logged = NULL;
}
if ($user_admin == NUL         


        
12条回答
  •  醉梦人生
    2020-11-27 14:02

    1.

    if(!($user_id || $user_name || $user_logged)){
        //do your stuff
    }
    

    2 . No. I actually did not understand why you write such a construct.

    3 . Put all values into array, for example $ar["user_id"], etc.

提交回复
热议问题