not_zero

(/rs/public/functions.php)

not_zero -- Check if a value is a non-zero number.

Description

bool not_zero ($num)

This function will return boolean true if $num is numeric and is non-zero. It will return boolean false otherwise.

Examples

not_zero (3) ; /* Returns true */
not_zero (0) ; /* Returns false */
not_zero ("foo") ; /* Returns false */
not_zero (NULL) ; /* Returns false */

Related Functions

None.

Dependencies

None.

Function Index