note 12793 modified in function.isset.php by danbeck

From: Date: Thu, 21 Jun 2001 20:18:54 +0000
Subject: note 12793 modified in function.isset.php by danbeck
Groups: php.notes 
Request: Send a blank email to php-notes+get-14541@lists.php.net to get a copy of this message
I made a very handy function that checks if multiple variables are set. It is very usefull when processing forms, or adding data into databases. I was very suprised that the isset function didn't take more than one argument, I hope they will implement it like this in the future. This is the function: (indentation is completely screwed up, please fix this before using) <?php // isset multiple argument checker function ismset() { $ac = func_num_args(); for ($i = 0; $i < $ac; $i++) { if (!isset(func_get_arg($i))) return false; } return true; } ?> http://www.php.net/manual/function.isset.php.php

« previous php.notes (#14541) next »