$arr = array('13.5', "3.14", 'abcXYZ', 'AbCd1fgH7', 'xyz@!$wsp', '123');
foreach ($arr as $s)
{
if (ctype_digit($s))
echo "$s is only digits <br />";
else
echo "$s is NOT only digits <br />";
}
/*
run:
13.5 is NOT only digits
3.14 is NOT only digits
abcXYZ is NOT only digits
AbCd1fgH7 is NOT only digits
xyz@!$wsp is NOT only digits
123 is only digits
*/