Leap Year Program A leap year is the one which has 366 days in a year. A leap year comes after every…
regex
-
-
Prime Number A number which is only divisible by 1 and itself is called prime number. Numbers 2, 3, 5, 7, 11,…
-
Sum of Digits To find sum of digits of a number just add all the digits. For example, 14597 = 1 +…
-
PHP abs() function The abs() function returns absolute value of given number. It returns an integer value but if you pass floating…
-
Reverse number A number can be written in reverse order. For example 12345 = 54321 Logic: Declare a variable to store reverse…
-
Swapping two numbers Two numbers can be swapped or interchanged. It means first number will become second and second number will become…
-
Table of Number A table of a number can be printed using a loop in program. Logic: Define the number. Run for…
-
Star Triangle The star triangle in PHP is made using for and foreach loop. There are a lot of star patterns. We’ll…
-
String get_html_translation_table() Function The get_html_translation_table() is the in-built function of PHP. This function returns the translation table which is used by htmlspecialchars()…
-
Adding Two Numbers There are three methods to add two numbers: Adding in simple code in PHP Adding in form in PHP…