<?php
function isPalindrome($string=null)
{
if($string === null)
return 0;
if(is_numeric($string))
return 0;
$string = preg_replace('/\s+/', '', $string);
$reverse = strrev($string);
if($reverse == $string)
return 1;
else
return 0;
}
echo isPalindrome('lion oil');
Comments
Comments are not available for this entry.