PHP 8.5.0 Beta 1 available for testing

Voting

: one plus four?
(Example: nine)

The Note You're Voting On

AT-HE (at_he.hotmail)
14 years ago
you can use this function with strlen to check illegal characters, string lenght must be the same than strspn (characters from my string contained in another)

<?php

$digits
='0123456789';

if (
strlen($phone) != strspn($phone,$digits))
echo
"illegal characters";

?>

<< Back to user notes page

To Top