In this tutorial, we are going to create a simple program that can count small and capital letters in a website using PHP and HTML. The program count the number of Small and Capital letters that is given by the user in the TextBox.
First, we are going to create our simple markup and it contains the TextBox and the button to count the small and capital letters given by the user.
Then, we create a simple query where the small and capital letters separate. The purpose of this query, our program will know the format of small and capital letters and to have an easy count when the button hit by the user.
Using the PHP query below, getting the information from the user enters in the TextBox, so we can get the desired word or phrase from the user then this simple query will get it and count the small and capital letters given from the user.
After executing the source code above, in the source code below, used to display the result count of small and capital letters. Look the simple markup below with PHP source code to display the result.