Jump to content

[SOLVED] help with if statement...


MDanz

Recommended Posts

if($row_data != FALSE) {
          $image = $row_data['imagelocation'];
              $stackname = $row_data['name'];
            echo "<td><a href='http://www.gsdgsg.com/search.php?search=$stackname' style='text-decoration: none';><table border='0' celpadding='0' cellspacing='0'>
<tr>
<td width='100px' height='101px' [b]background='$image'[/b] VALIGN='middle'>
<font size=3 font face=Arial font color=white><center><b><font style='background-color: black'>$stackname</font></b></center></font></td>
</td>
</tr>

</table></a></td>"; 

        } 

 

 

the part bolded... i want IF a value is in the row(imagelocation) of the database use the above code.  If  a value isn't in the row, then use the code below.  How do i do this?

 

 

if($row_data != FALSE) {
          $image = $row_data['imagelocation'];
              $stackname = $row_data['name'];
            echo "<td><a href='http://www.gsdgsg.com/search.php?search=$stackname' style='text-decoration: none';><table border='0' celpadding='0' cellspacing='0'>
<tr>
<td width='100px' height='101px' [b]background='[b]Stacks/template.jpg[/b]'[/b] VALIGN='middle'>
<font size=3 font face=Arial font color=white><center><b><font style='background-color: black'>$stackname</font></b></center></font></td>
</td>
</tr>

</table></a></td>"; 

        } 

 

 

Link to comment
https://forums.phpfreaks.com/topic/172289-solved-help-with-if-statement/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.