Home » PHP Area of Rectangle Program

PHP Area of Rectangle Program

by Online Tutorials Library

Area of a Rectangle

Area of a rectangle is calculated by the mathematical formula,

Logic:

  • Take two variables.
  • Multiply both of them.

Area of Rectangle in PHP

Program to calculate area of rectangle with length as 14 and width as 12 is shown.

Example:

Output:

PHP Area of rectangle 1


Area of Rectangle with Form in PHP

Program to calculate area of rectangle by inserting values in the form is shown.

Example:

Output:

PHP Area of rectangle 2

Next TopicLeap Year Program

You may also like