I have the following code written so that I can display news in our company's format. What I'm trying to figure out is how to write an IF statement within this code to enable the **'d portioned to be seen or not be seen.
Here's the code:
<?php
while ($a_row = mysql_fetch_array( $divisionNews ) ) {
$title=$a_row['entry_title'];
$news=$a_row['entry_text'];
$plusnews=$a_row['entry_text_more'];
print "$pageopen";
print "$title";
print "<div id=\"content\"><div class=\"blog\"><div class=\"blogbody\">";
print "$pagebody";
print "<img align=\"right\" src=\"".FS_IMAGE_SERVER."$siteID/news/$blogid.png\">";
print "$news";
// ** NEED TO BE IF STATEMENT IF $plusnews HAS INFORMATION IN IT **
print " [ <a href=\"javascript:toggleParagraph();\">Expand</a> ]";
print "<div id=\"myPara\" style=\"display:none\">$plusnews</div>";
// CLOSE
print "$pageend";
}
?>
How do I write the IF statement to say if $plusnews has content or a character, display the Expand option else goto CLOSE?
Digatle
Here's the code:
<?php
while ($a_row = mysql_fetch_array( $divisionNews ) ) {
$title=$a_row['entry_title'];
$news=$a_row['entry_text'];
$plusnews=$a_row['entry_text_more'];
print "$pageopen";
print "$title";
print "<div id=\"content\"><div class=\"blog\"><div class=\"blogbody\">";
print "$pagebody";
print "<img align=\"right\" src=\"".FS_IMAGE_SERVER."$siteID/news/$blogid.png\">";
print "$news";
// ** NEED TO BE IF STATEMENT IF $plusnews HAS INFORMATION IN IT **
print " [ <a href=\"javascript:toggleParagraph();\">Expand</a> ]";
print "<div id=\"myPara\" style=\"display:none\">$plusnews</div>";
// CLOSE
print "$pageend";
}
?>
How do I write the IF statement to say if $plusnews has content or a character, display the Expand option else goto CLOSE?
Digatle