function check_for_number($str) {
$i = strlen($str);
while ($i--) {
if (is_numeric($str[$i]))
return true;
else {
echo '<script type="text/javascript">window.location.replace("example.com");</script>';
}
}
}
$idq = $_GET ['id'];
check_for_number ($idq);