PHP if not statements

后端 未结 7 2131
南方客
南方客 2020-12-17 10:46

This may be the way my server is set up, but I\'m banging my head against the wall. I\'m trying to say that if $action has no value or has a value that is not \

7条回答
  •  太阳男子
    2020-12-17 11:17

    I think this is the best and easiest way to do it:

    if (!(isset($action) && ($action == "add" || $action == "delete")))
    

提交回复
热议问题