while ($row = mysql_fetch_assoc($result)) {
$new_array[$row['name']][count($new_array[$row['name']])] = $row['age'];
}
$_ip = $_SERVER['REMOTE_ADDR'];
if ($_dots = explode('.', $_ip))
{
if (count($_dots) == 4)
{
foreach ($_dots as $_dot)
{
if (!in_array($_dot, range(0,255)))
{
define('ip', false, true);
break;
}
}
define('ip', $_ip, true);
unset($_ip, $_dots);
}
else define('ip', false, true);
}
else define('ip', false, true);