PHP program to find if a character is vowel or a consonant
<?php
$char=$_POST['ch'];
if($char=="a")
{
echo $char."   is vowel";
}
elseif($char=="e")
{
echo $char."   is vowel";
}
elseif($char=="i")
{
echo $char."   is vowel";
}
elseif($char=="o")
{
echo $char."   is vowel";
}
elseif($char=="u")
{
echo $char."   is vowel";
}
else
{
echo $char. "  is consonant";
}
?>
<body>
<form method="post">
Enter a character<input type="text" name="ch"/><hr/>
<input type="submit"/>
</form>
</body>
$char=$_POST['ch'];
if($char=="a")
{
echo $char."   is vowel";
}
elseif($char=="e")
{
echo $char."   is vowel";
}
elseif($char=="i")
{
echo $char."   is vowel";
}
elseif($char=="o")
{
echo $char."   is vowel";
}
elseif($char=="u")
{
echo $char."   is vowel";
}
else
{
echo $char. "  is consonant";
}
?>
<body>
<form method="post">
Enter a character<input type="text" name="ch"/><hr/>
<input type="submit"/>
</form>
</body>
No comments:
Post a Comment