Question: PHP FUNCTION EXPLAIN IN DETAIL HOW YOU PROGRAM IT I DONT UNDERSTAND HOW TO PUT ALL FUNCTIONS IN ONE CODE Write a PHP function
PHP FUNCTION
EXPLAIN IN DETAIL HOW YOU PROGRAM IT
I DONT UNDERSTAND HOW TO PUT ALL FUNCTIONS IN ONE CODE

\
Write a PHP function that, given a string in input that describes a geometric shape, plus two numeric values, will print in output the area of such shape. The function should be able to recognize and calculate the area of: a Rectangle, a Parallelogram, a Kite and a Circle To find the area of a rectangle, just multiply the length times the width To find the area of a parallelogram, just multiply the base length times the height To find the area of a kite, multiply the lengths of the two diagonals and divide by 2 To find the area of a circle, multiply the square of the radius times pi (you can use pi 3.141592)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
