Enter a word(s):<input type=text name='phrase'></br>
<input type=submit value=generate></br>
<?php
$vowel;
$conso;
$nums;
switch($_POST['phrase']){
case'a':
case'A':
case'E':
Case'e':
Case'I':
case'i':
case'O':
case'o':
case'U':
case'u':
$vowel+=1;
break;
case'0':
case'1':
case'2':
case'3':
case'4':
case'5':
case'6':
case'7':
case'8':
case'9':
$nums+=1;
break;
default:
$conso+=1;
break;
}
echo"Vowels:",$vowel;
echo"</br>";
echo"Consonants:",$conso;
echo"</br>";
echo"Numbers:",$nums;
echo"</br>";
?>
<input type=reset value=reset>
</font>
</form>
</body>
</html>
can someone tell me how to do it on full string type???
I need to count consonants the vowels and the numbers disregarding the spaces and special characters
Last edited by Ezzaral; Sep 14th, 2009 at 5:39 pm. Reason: Fixed code tags.
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.