the browser shows an parse error on line 192

Discussion in 'PHP' started by co.ador, Jul 20, 2009.

  1. #1
    Parse error below
    
    <?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">&nbsp;</td>
      <td width="54" bgcolor="#FFFFFF"><strong>Price:</strong></td>
      <td colspan="7">$<span class="style3">'.$row[6] .'</span></td>
    <tr>
      <td class="style1">&nbsp;</td>
      <td colspan="7" class="style3">&nbsp;</td>
    </tr>
    <tr><td>&nbsp;</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;
          }.'  //This is line 192 where the browser has found the parsing error
    </table></td>
    </tr>';
    PHP:

     
    co.ador, Jul 20, 2009 IP
  2. bartolay13

    bartolay13 Active Member

    Messages:
    735
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    98
    #2
    you cant put a condition between a concatination.. try putting your condition result into a variable
     
    bartolay13, Jul 21, 2009 IP
  3. Martinoes

    Martinoes Peon

    Messages:
    110
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Try this:

    <?php
    
    $ratingData = Rating::OutputRating($platename);
          
          if (Error::HasErrors())
          {
            $ratingData = Error::ShowErrorMessages();
            Error::ClearErrors();
          }
    
    
    
    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">&nbsp;</td>
      <td width="54" bgcolor="#FFFFFF"><strong>Price:</strong></td>
      <td colspan="7">$<span class="style3">'.$row[6] .'</span></td>
    <tr>
      <td class="style1">&nbsp;</td>
      <td colspan="7" class="style3">&nbsp;</td>
    </tr>
    <tr><td>&nbsp;</td><td><strong>Raiting:</strong></td>
      <td><table height"50" width="47%"> '.$ratingData.'
    </table></td>
    </tr>';
    PHP:
     
    Martinoes, Jul 21, 2009 IP