php - check if $_POST is array?

前端 未结 8 682
独厮守ぢ
独厮守ぢ 2020-12-21 14:58

I know this may be a silly question, but I come across a snippet of php code that check if the $_POST is_array() before execute other functions.

8条回答
  •  南笙
    南笙 (楼主)
    2020-12-21 15:07

    $_POST is always an array, they're probably checking if a certain $_POST value is an array.

    $_POST['test'] is not an array

    $_POST['test'] is an array

提交回复
热议问题