PHPBuilder - Validate variable

RSS Twitter
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;

Comment and Contribute

Your comment has been submitted and is pending approval.

Radford Smith II



(Maximum characters: 1200). You have characters left.