Last Updated: February 25, 2016
·
336
· kalin

Short check of empty values

Most php newbies do endless empty()/isset() constructs to check if all fields have value. How about we use this?

if(in_array("", $_POST)){
   // all fields are required. 
 }