Voting

: max(two, nine)?
(Example: nine)

The Note You're Voting On

steven at nevvix dot com
14 years ago
When you need to accept these as valid, non-empty values:
- 0 (0 as an integer)
- 0.0 (0 as a float)
- "0" (0 as a string)

<?php
function is_blank($value) {
return empty(
$value) && !is_numeric($value);
}
?>

This is similar to Rails' blank? method.

<< Back to user notes page

To Top