<?php
$a = $monitoring->getMonitoringServers();
if (in_array("192.168.100.253", $a))
echo "y";
else
echo "n";
?>
print_r($a)
yields:
Array (
[0] => stdClass Object ( [address] => 192.168.100.253 )
[1] => stdClass Object ( [address] => 192.168.100.253 )
)
What's wrong with this code? The answer is always no!