I am trying to do nested if statements but can't get it to work, basically on the site if a marina is listed it pops up in a box with some of the info, but there are also some fields within this box which may or may not appear. I can get the if statement to work for the box but the one for the intro link is within the echo and so it just prints the code, is there anyway around this, some of the code is below. Also, how do I get the shortentext function to work within the echo too.
Code:
<?php
if($detaillisting == "alisting") {
echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td><table width=\"495\" border=\"0\" align=\"center\" cellpadding=\"1\" cellspacing=\"0\" bgcolor=\"#6699CC\">
<tr>
<td><div align=\"center\">
<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">
<tr>
<td bgcolor=\"#6699CC\"><span class=\"titlelight\">$detailname</span> <spanclass=\"titlelight\">-</span>
<span class=\"titlelight\">$detailtown</span></td>
</tr>
<tr>
<td bgcolor=\"#F2F7F9\"><img src=\"site_images/spacer.gif\" width=\"1\" height=\"1\"></td>
</tr>
<tr>
<td bgcolor=\"#F2F7F9\"> <p class=\"text\">
if ($detailintro <> \"\")
{
echo ShortenText($detailintro)... <a href=\"details.php?marina=$detailmarina\" class=\"textlink\">more</a>
}
</p>