Why do I need the isset() function in php?

后端 未结 6 1657
终归单人心
终归单人心 2021-01-04 06:27

I am trying to understand the difference between this:

if (isset($_POST[\'Submit\'])) { 
  //do something
}

and

if ($_POST[         


        
6条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-04 07:18

    isset will return TRUE if it exists and is not NULL otherwise it is FALSE.

提交回复
热议问题