24 lines
249 B
PHP
24 lines
249 B
PHP
<?php
|
|
|
|
$p=121;
|
|
while((int)$num!=0)
|
|
{
|
|
$rem=$num%10;
|
|
$sum=$sum*10+$rem;
|
|
$num=$num/10;
|
|
}
|
|
|
|
if($sum==$p)
|
|
{
|
|
echo $p," is palindrome number";
|
|
}
|
|
else
|
|
{
|
|
echo $p." is not palindrome number";
|
|
}
|
|
|
|
?>
|
|
/*
|
|
Output
|
|
|
|
121 is palindrome number
|