Friday, 19 March 2021

check enter value if character or digit or Special Symbol using php

 check enter value if character or digit or Special Symbol using php



<title>check enter value if character or digit or Special Symbol using php</title>

<?php
/* Enter a character and display a message on the screen telling the user 
wether the character is an alphabet or digit or any other special character.*/
$a=0;
if($a>='0' && $a<='9')
{
print"Digit";
}
if($a>='a' && $a<='z' | $a>='A' && $a<='Z')
{
print"Alphabet";
}
else
{
print"Special Symbol";
}
?>

No comments:

Post a Comment