Voting

: five plus zero?
(Example: nine)

The Note You're Voting On

GazetteSDF
6 years ago
For the verification of a form, to "block" entries such as a simple space or other, I thought of this combination:

function isEmpty($string){
$val = preg_replace('#[^A-Za-z0-9]+#', '', $string) ;
$val = trim($string, '');
return ($string=='') ;
}

This protects entries like: ' ' ,' - ', '. - +', ... On entries like name, profession, ... it's helpful

<< Back to user notes page

To Top