请教一个判断问题,谢谢指导
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