[man]is_numeric/man Number or numeric string
and
[man]is_string/man String in general
Those two tests both return TRUE or FALSE depending on if the variable is a string, or is a number (or numeric string).
Alternatively, you could say:
if(eregi("^[^0-9]*$", $string_to_be_searched))
{
// We have anything but an all numeric string
}
else
{
// We can assume we have a numeric string
}