Snippets
Other
Validate variable
by: Radford Smith II
|
July 14, 2002
Version: 1.0
Type: Function
Category: Other
License: GNU General Public License
Description: A simple, but useful function that sets a variable to a value if the expression given is false.
function validVar($ex, &$var, $default) {
if (!$ex) {
$var = $default;
}
}