I am trying to insert this bit of php code <?php $ratingData = Rating::OutputRating($platename); if (Error::HasErrors()) { echo Error::ShowErrorMessages(); Error::ClearErrors(); } else { echo $ratingData; } ?> PHP: Inside the escaped echoed tables below. THe php code above is placed inside the escaped tables below. But it is not parsing correctly. <?php echo '<table width="100%" border="0" cellspacing="0" cellpadding="0" class="itemdetails"> <tr> <td width="1100" height="350" bgcolor="#FFFFFF" class="tento"> <table class="cafe"><tr><td width="547"> <a href="#"><h3 align="justify" style="position:relative; height:5px; top: 10px;">',$row[2] ,'</h3></a> </td> </tr> </table> <table width="1215" height="609" class="chencho" > <td class="largethumb" rowspan="8" align="center"> <a href="#"><img src="../images/image1.jpg" width="270" height="160" alt="coloe"/></a></td> <td width="340" rowspan="8" padding="0" ><table width="252" style="font-size:12px; position:relative; top:-6px;"> <td width="1"> </td> <td width="54" bgcolor="#FFFFFF"><strong>Price:</strong></td> <td colspan="7">$<span class="style3">',$row[6] ,'</span></td> <tr> <td class="style1"> </td> <td colspan="7" class="style3"> </td> </tr> <tr><td> </td><td><strong>Raiting:</strong></td> <td><table height"50" width="47%"> <?php $ratingData = Rating::OutputRating($platename); if (Error::HasErrors()) { echo Error::ShowErrorMessages(); Error::ClearErrors(); } else { echo $ratingData; } ?></table></td> </tr>'; ?> PHP:
Hi mate, here's how you'll do it. <?php $ratingData = Rating::OutputRating($platename); if (Error::HasErrors()) { $rate = Error::ShowErrorMessages(); Error::ClearErrors(); } else { $rate = $ratingData; } echo '<table width="100%" border="0" cellspacing="0" cellpadding="0" class="itemdetails"> <tr> <td width="1100" height="350" bgcolor="#FFFFFF" class="tento"> <table class="cafe"><tr><td width="547"> <a href="#"><h3 align="justify" style="position:relative; height:5px; top: 10px;">',$row[2] ,'</h3></a> </td> </tr> </table> <table width="1215" height="609" class="chencho" > <td class="largethumb" rowspan="8" align="center"> <a href="#"><img src="../images/image1.jpg" width="270" height="160" alt="coloe"/></a></td> <td width="340" rowspan="8" padding="0" ><table width="252" style="font-size:12px; position:relative; top:-6px;"> <td width="1"> </td> <td width="54" bgcolor="#FFFFFF"><strong>Price:</strong></td> <td colspan="7">$<span class="style3">',$row[6] ,'</span></td> <tr> <td class="style1"> </td> <td colspan="7" class="style3"> </td> </tr> <tr><td> </td><td><strong>Raiting:</strong></td> <td><table height"50" width="47%"> '.$rate.'</table></td> </tr>'; ?> PHP:
<?php echo '<table width="100%" border="0" cellspacing="0" cellpadding="0" class="itemdetails"><tr><td width="1100" height="350" bgcolor="#FFFFFF" class="tento"><table class="cafe"><tr><td width="547"><a href="#"><h3 align="justify" style="position:relative; height:5px; top: 10px;">',$row[2] ,'</h3></a></td></tr></table><table width="1215" height="609" class="chencho" ><td class="largethumb" rowspan="8" align="center"><a href="#"><img src="../images/image1.jpg" width="270" height="160" alt="coloe"/></a></td><td width="340" rowspan="8" padding="0" ><table width="252" style="font-size:12px; position:relative; top:-6px;"><td width="1"> </td><td width="54" bgcolor="#FFFFFF"><strong>Price:</strong></td><td colspan="7">$<span class="style3">',$row[6] ,'</span></td><tr><td class="style1"> </td><td colspan="7" class="style3"> </td></tr><tr><td> </td><td><strong>Raiting:</strong></td><td><table height"50" width="47%">'; $ratingData = Rating::OutputRating($platename); if (Error::HasErrors()) { echo Error::ShowErrorMessages(); Error::ClearErrors(); } else { echo $ratingData; } echo '</table></td></tr>'; ?>
<?php echo '<table width="100%" border="0" cellspacing="0" cellpadding="0" class="itemdetails"> <tr> <td width="1100" height="350" bgcolor="#FFFFFF" class="tento"> <table class="cafe"><tr><td width="547"> <a href="#"><h3 align="justify" style="position:relative; height:5px; top: 10px;">',$row[2] ,'</h3></a> </td> </tr> </table> <table width="1215" height="609" class="chencho" > <td class="largethumb" rowspan="8" align="center"> <a href="#"><img src="../images/image1.jpg" width="270" height="160" alt="coloe"/></a></td> <td width="340" rowspan="8" padding="0" ><table width="252" style="font-size:12px; position:relative; top:-6px;"> <td width="1"> </td> <td width="54" bgcolor="#FFFFFF"><strong>Price:</strong></td> <td colspan="7">$<span class="style3">',$row[6] ,'</span></td> <tr> <td class="style1"> </td> <td colspan="7" class="style3"> </td> </tr> <tr><td> </td><td><strong>Raiting:</strong></td> <td><table height"50" width="47%"> <?php $ratingData = Rating::OutputRating($platename); if (Error::HasErrors()) { echo Error::ShowErrorMessages(); Error::ClearErrors(); } else { '.$ratingData.'; } ?></table></td> </tr>'; ?> PHP: