在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时,如何让它显示图像?
答案 0 :(得分:3)
if($json_arr['_visitor_alertsUnread'])
echo "seen picture!";
else
echo "not seen picture!";