Home » PHP Palindrome Number Program

PHP Palindrome Number Program

by Online Tutorials Library

Palindrome Number

A palindrome number is a number which remains same when its digits are reversed.

For example, number 24142 is a palindrome number. On reversing it we?ll get the same number.

Logic:

  • Take a number.
  • Reverse the input number.
  • Compare the two numbers.
  • If equal, it means number is palindrome

Palindrome Number in PHP

Example:

Output:

PHP Palindrome number 1


Palindrome Number using Form in PHP

Example:

We’ll show the logic to check whether a number is palindrome or not.

Output:

On entering the number 23432, we get the following output.

PHP Palindrome number 2

On entering the number 12345, we get the following output.

PHP Palindrome number 3

Next TopicFibonacci Series

You may also like