3

在 PHP 中,当 int 从 0 变为 1 时,如何让它显示图像?我有;

$url = "forums.bukkit.org/alerts.json";
$page = file_get_contents($url);
$json_arr = json_decode($string,true);
return $json_arr['_visitor_alertsUnread'];

当 json_arr >0 时,如何让它显示图像?

4

1 回答 1

3
if($json_arr['_visitor_alertsUnread'])
   echo "seen picture!";
else
   echo "not seen picture!";
于 2012-06-24T22:52:42.667 回答