Question: Using PHP user-defined functions and if..else statements, write the code to do the following: 1. Define a function named: full_day which takes one parameter: $d
Using PHP user-defined functions and if..else statements, write the code to do the following:
1. Define a function named: "full_day" which takes one parameter: "$d" to store the short name of the day.
For example "Fri" for "Friday", "Sat" for "Saturday" and so on.
2. The function prints the fullname of the day if the passed parameter = "Fri" or "Sat", Otherwise it will print "Weekdays".
Assume you call the function and pass the value "Fri" to the function, then it will give the following output:
Friday
Assume you call the function and pass the value "Mon" to the function, then it will give the following output:
Monday
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
