Find Armstrong Number

An Armstrong number is sum of the cubes of its digits is equal to the number itself. There are six Armstrong numbers in the range of 0 and 999. Armstrong number 1: 0 Armstrong number 2: 1 Armstrong number 3: 153 Armstrong number 4: 370 Armstrong number 5: 371 Armstrong number 6: 407 PHP Program […]

Write a program find Factorial of a number

Here we are writing a program of print the factorial of a number, factorial means 1 to n multiply them where n is defined by the product of all the digits from 1 to n. Important Points About Factorial: 1. Factorial is denoted by n!. 2. Factorial is calculated only for positive integers(9) not for […]

Write a PHP program to Print table of Number

Here we are write a PHP program to print table of given number, A table of a number can be printed using a loop. Logical Part of program: 1. First you have to take a number. 2. Then run the for loop 3. Then Multiply the number with output of for loop (). PHP program […]

Write a PHP program to print prime number

Here we are write a program to find number is prime or not of a given number, Prime number which is only divisible by 1 and itself. Example of Prime Numbers: 2, 3, 5, 7, 11, 13, 17, 19, 23 etc. Prime number greater than 1 means 0 and 1 is not a prime number. […]

Write a PHP program to print number is Even or Odd

Here we are write a program to find number is Even or Odd of a given number, for find the Even Odd we have to divide given number by 2. Odd Numbers : Odd numbers are those numbers which are not divisible by 2. Numbers Like 1, 3, 5, 7, 9, 11, 13, 15, 17, […]

Write a PHP program to print sum of digits

Here we are write a program to find sum of digits of a given number, for the sum of digits we have to add all the digits of given number. Logical Part of program: 1. First you have to take the number. 2. Then divide the taken number by 10. 3. Store the remainder into […]

Delete an element from an array in php

Some time ago during a job interview I got the task to Delete an element from an array in php. Is there an easy way to delete an element from a PHP array, If you want to delete just one array element you can use unset() or alternative array_splice(). <?php $array = array(0 => “a”, […]

Print string in reverse order in php

Some time ago during a job interview I got the task to print a string in reverse order in PHP. Here i am writing program for print string in revers order using strrev() function. <?php $str = ‘This is string Print In Revers Order’; echo strrev(str); ?> Print string in revers order without using strrev() […]

Sort elements in an array in descending order PHP program

PHP Functions For Sorting Array In Descending Order: rsort(). The rsort() function sorts an indexed array in descending order. Sort the elements of the $MyArray array in descending numerical order: <?php     $MyArray=array(8, 20, 4, 100, 50, 6, 9, 11, 22, 5);     rsort($MyArray);     print_r($MyArray); ?> Output: Array ( [0] => 100 [1] => […]

PHPKIDA Offering Free Tools:

INSTA DOWNLOADER

Download Instagram Videos & Photos.

Download Now

CURRENCY CONVERTER

Real Time Currency Converter

Convert Now

ROBOST.TXT GEN.

Robots.txt File Creater

Create Now

HTML MINIFIER

Compress yout HTML Code

Minify Now

CSS MINIFIER

Compress yout CSS Code

Minify Now

JAVASCRIPT MINIFIER

Compress yout JavaScript Code

Minify Now

Sign up for weekly update

Milkshake is almost ready. If you're interested in testing it out, then sign up below to get exclusive access.