Total numbers of Vowels - PHP Online
Form of PHP Sandbox
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of Total numbers of Vowels.php
- <?php
- $str="This is a morning of October thirty";
- $string=strtolower($str);
- $vowel=array('a','e','i','o','u');
- $len=strlen($string);
- $num=0;
- for($i=0;$i<$len;$i++)
- {
- if(in_array($string[$i],$vowel))
- {
- $num++;
- }
- }
- echo" ".$num;
- ?>
File Description
- Total numbers of Vowels
- PHP Code
- 13 Jan-2021
- 249 Bytes
You can Share it:
Latest PHP Pastes