Jump to content

[SOLVED] Only display if variable is set


Ell20

Recommended Posts

Hey guys,

 

Im trying to display some information in a while loop however one of the bits of data is optional so I dont want the heading to be displayed if there is no data in the variable.

 

Here is my code at the moment but it dosent appear to be working:

 

<?php 
        if(isset($row['description'])) {
echo "<b>Team Description: </b>";
echo $row['description'];
echo "<br>";
}
?>

 

Thanks for any help

Link to comment
https://forums.phpfreaks.com/topic/75280-solved-only-display-if-variable-is-set/
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.