foreach site_s as value status value- status echo br if status OK ok e

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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;
}
}