foreach ($site_s as $value) {
$status = $value->status;
echo '<br>';
if ($status == 'OK') {
$ok++;
echo 'OK ';
echo $ok;
}
elseif ($status == 'SLEEP') {
$sleep++;
echo 'SLEEP ';
echo $sleep;
}
elseif ($status == 'ERROR') {
$error++;
echo 'ERROR ';
echo $error;
}
elseif ($status == 'OPT_WAIT') {
$opt_wait++;
echo 'OPT_WAIT ';
echo $opt_wait;
}
}