POST or GET data empty check


/ Published in: PHP
Save to your folder(s)

I don't want to write function empty() again and again.


Copy this code and paste it in your HTML
  1. <?php
  2. function check_empty($args=array()) {
  3. foreach($args as $arg) {
  4. if (empty($arg)) {
  5. return false;
  6. }
  7. }
  8. }
  9. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.