PHP program to enter length and breadth of a rectangle and find its perimeter
PHP program to enter the length and breadth of a rectangle and find its perimeter.
There are you will learn how to find the perimeter of a rectangle in PHP language.
P = 2(l + w)
P = perimeter
l = length of the rectangle
w = width of the rectangle
Let us understand this through the PHP program:
<?php // PHP program to find the perimeter of a rectangle $l = 5; $w = 7; $p = NULL; // Calculate perimeter of rectangle $p = 2 * ($l + $w); echo "\nThe Perimeter of rectangle = " . $p . " units" ?>
The Perimeter of rectangle = 24 units