Home >Backend Development >PHP Tutorial >请问一个判断有关问题,多谢指导

请问一个判断有关问题,多谢指导

WBOY
WBOYOriginal
2016-06-13 10:10:57812browse

请教一个判断问题,谢谢指导

require("conn.php");
$sid=$_GET["id"];
$result=mysql_query("select * from jswo where id='$sid' order by id desc limit 0,1");
$rs=mysql_fetch_array($result);
?>




请问一个判断有关问题,多谢指导src="" width=185>



对于以上代码,现在我有个判断,假设上面IMG字段为空,没有内容,那我想实现请问一个判断有关问题,多谢指导src="" width=185>这段代码就全部不显示,假设IMG字段有数据时,那请问一个判断有关问题,多谢指导" width=185>这段代码就全部显示出来!请问该怎么写呀?谢谢指导!


------解决方案--------------------

echo !empty($rs["img"]) ? '请问一个判断有关问题,多谢指导' : '';

?>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn