Course recommendation:

PHP filter_var() function

Definition and usage

The filter_var() function filters the variable through the specified filter.

If successful, returns the filtered data, if failed, returns false.

SyntaxDescriptionfilter_var( Required. Specify the variable to filter.filter_var( Optional. Specify the ID of the filter to use.filter_var("someone@example....com", FILTER_VALIDATE_EMAIL)
, Parameter
Description variable
Required. Specify the variable to filter. filter
Optional. Specify the ID of the filter to use. options

Define an array of flags/options. Check each filter's possible flags and options.

Hint and commentsHint:See alsoPHP Filter Reference Manual

,ກວດສອບກັບຈຸດສຸມທີ່ສາມາດນໍາໃຊ້ກັບຫົວຂໍ້ນີ້.

ຄວາມຫົວຂໍ້
<?phpif(!filter_var("someone@example....com", FILTER_VALIDATE_EMAIL)
 else
 )
 echo("E-mail is valid");
echo("E-mail is not valid");
 else
 {
 echo("E-mail is valid");
}

?>

ຕົວແທນຂອງອອກມາອີກ: