Star Triangle
Star Triangle The star triangle in PHP is made using for and foreach loop. There are a lot of star patterns. We’ll show some of them here. Pattern 1 Output: … Read More
Star Triangle The star triangle in PHP is made using for and foreach loop. There are a lot of star patterns. We’ll show some of them here. Pattern 1 Output: … Read More
Number Triangle Number triangle in PHP can be printed using for and foreach loop. There are a lot of patterns in number triangle. Some of them are show here. Pattern1
Alphabet Triangle Pattern Some different alphabet triangle patterns using range() function in PHP are shown below. Pattern 1
Alphabet Triangle Method There are three methods to print the alphabets in a triangle or in a pyramid form. Logic: Using range() function This range function stores values in an … Read More
Leap Year Program A leap year is the one which has 366 days in a year. A leap year comes after every four years. Hence a leap year is always … Read More
Area of a Rectangle Area of a rectangle is calculated by the mathematical formula, Logic: Area of Rectangle in PHP Program to calculate area of rectangle with length as 14 … Read More
Area of Triangle Area of a triangle is calculated by the following Mathematical formula, Area of Triangle in PHP Program to calculate area of triangle with base as 10 and … Read More
Subtracting Two Numbers There are three methods to subtract two numbers: Subtraction in Simple Code Subtraction of two numbers 30 and 15 is shown. Example:
Adding Two Numbers There are three methods to add two numbers: Adding in Simple Code Addition of two numbers 15 and 30 is shown here. Example:
Swapping two numbers Two numbers can be swapped or interchanged. It means first number will become second and second number will become first. For example There are two methods for … Read More