Question
1) Write a Php application that accepts two dates from the user and displays which date earlier than the other 2) Write a Php application
1) Write a Php application that accepts two dates from the user and displays which date
earlier than the other
2) Write a Php application that accepts two dates from the user and displays the number of days between the two dates
3) Write a Php program that accepts the user's date of birth and displays if the user's birthday (this year) has passed or not.
4) Extend the Example application to accept users gender and display it. The user must be allowed to select the gender from a set of Radio buttons with values Male, Female.
5) Extend the previous exercise to collect users party affiliation and display it. The user must be allowed to selects affiliation from a drop-down list with the values of Republican, Democrat, Independent, Undecided.
6) Write an application that uses a form to collect the state code from the user and displays the corresponding capital city. The user can enter one of the following states
MD (Annapolis), VA (Richmond), WV (Charleston), NJ (Trenton).
If the user enters any other state, display the following message
7) Write an application that accepts the state code and displays the corresponding capital city. The application must account for the user entering the code in either upper-case or lower-case.
MD Annapolis, VA- Richmond, NJ- Trenton, WV- Charleston
8) Write an application that accepts that accepts a letter from the user and displays if the letter is upper-case or lower-case letter
9) Re-do exercise-2 using the switch-case statement instead of the if statement.
10). Write an application that accepts an animal species from the user and displays its family. The user can enter one of the following
Eagle, Raven : bird
Betta, Salmon: fish
Mouse, Rat : rodent
e.g. If user enters Raven or Eagle, display bird
11) Write a PhP application that accepts a number from the user and displays the greeting Hello that many number of times as the number entered by the user
12) Write a PhP application that accepts two numbers from the user and displays 10 random numbers between the two numbers.
13) Write a PhP application that accepts a users 10 digit phone number and displays the area code
14) Write a PhP application that accepts a users 10 digit phone number and displays the phone number with hyphens i.e. in the format 123-456-7890
15) Write a PhP application that accepts the users name and displays it reversed.
16) Write a PhP application that accepts two strings from the user and displays following:
The position of first occurrence of the second string in the first string.
17) Write a PhP application that accepts two strings from the user and displays following:
1. The number of occurrences of the second string in the first string
2. The positions of occurrence of the second string in the first string.
18) Write a PhP application that accepts three strings from the user, replaces all occurrences of str2 in str1 with str3 and displays the new str1.
19) Write a PhP application that accepts a string and displays the following
Number of vowels
Number of uppercase vowels
Number of lowercase vowels
Whether the string is a palindrome
String with all spaces removed
20) Write a PhP application that accepts three words from the user and displays them in alphabetical order (sorted). Be sure to account for leading and trailing white spaces in the user input.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started