如果<div class="container">
<iframe src="fb_link" width="100%;" height="100%;" style="border: none; overflow: hidden;" scrolling="no" frameborder="0" allowTransparency="true" allowFullScreen="true"></iframe>
</div>
为$row['division']
,则在此代码中显示相关网页的链接。当Leech
为$row['division']
时,它显示空格,即使它没有显示DME
的最后一部分。
else statement
答案 0 :(得分:3)
试试这个:
<td>
<?php
if ($row['division'] == "Leech") {
echo '<a rel="facebox" href="viewevaldme.php?evaid='.$row['evaid'].'">Click Here</a>';
} elseif($row['division'] =="DME") {
echo '<a rel="facebox" href="vieweval.php?evaid='.$row['evaid'].'">Click Here</a> ';
} else {
echo 'Wrong Division Selected';
}
?>
</td>
答案 1 :(得分:2)
试试这个:
<td>
<?php
if ($row['division'] === "Leech") {
print '<a rel="facebox" href="viewevaldme.php?evaid='.$row['evaid'].'">Click Here</a>';
} elseif($row['division']==="DME") {
print '<a rel="facebox" href="vieweval.php?evaid='.$row['evaid'].'">Click Here</a> ';
} else {
print 'Wrong Division Selected';
}
?>
</td>