<?php
$a = $monitoring->getMonitoringServers();
if (in_array("192.168.100.253", $a))
echo "y";
else
echo "n";
?>
print_r($a)
产量:PHP的in_array结果总是一样的。
Array (
[0] => stdClass Object ([address] => 192.168.100.253)
[1] => stdClass Object ([address] => 192.168.100.253)
)
有什么不对的代码?答案永远不是!
请提高的问题title,它并没有真正说出任何东西 – 2011-06-08 11:12:21