PHP 接收筛选项包含0的select下拉菜单的处理

这种情况下,PHP的判断方法如下:

$where = "1=1";
if ($get['status'] !== '' && $get['status'] !== false) {
    $where .= " AND status='{$get['status']}'";
}

 

posted @ 2019-01-03 11:05  码农骆驼  阅读(584)  评论(0编辑  收藏  举报