mysqlのテーブル値に基づいて2つの異なる画像を表示するのに問題があります。基本的に、social_activitiesテーブルの値が1の場合は、「tick.png」を表示し、値が「0」の場合は、「cross.png」を表示します。
現時点では、値が1の場合はcross.pngを取得し、値が0の場合は画像をまったく取得していません。明らかに何か問題がありますが、私は何を知りませんか?
どこが悪いのか教えてください。
ありがとう。
<?php
$get_social_set = get_social();
while ($social = mysql_fetch_array($get_social_set))
// get results from database
// process results
if ( $results === 1) {
$image = 'assets/img/icons/tick.png';
} else {
$image = 'assets/img/icons/cross.png';
}
?>
<table width="100%" border="0">
<tr>
<td width="10"> </td>
<td width="30"><img src="<?php echo $image ?>" /></td>