table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nwebhosting
    New Member
    • Oct 2006
    • 23

    table

    Dear sir.
    I am trying to put my information this way:

    gameandtoyname
    pricevalue
    image

    but i am getting this error

    Parse error: parse error in C:s\textimage10 .php on line 163

    Could you help plzz.

    [HTML]
    [PHP]

    <?php
    <table>
    <tr>';

    <td>'$str .= "<a
    href=\"textimag e10.php?iid=".$ row["image_id"]."\">".$row["image_name "]."</a> " '</td>';
    </tr>

    <tr>';

    <td>'$str .= "<a
    href=\"textimag e10.php?iid=".$ row["image_id"]."\">".$row["image_name "]."</a> ";
    $str .= "[".$row["gameandtoyname "]."] " '</td>';
    </tr>

    <tr>';

    <td>'$str .= "$".$row["pricevalue "]." " '</td>';
    </tr>

    <tr>';

    <td>'$str .="<img border=\"1\" height=\"90\" width=\"100\"
    src=\"imagedoll s.php?act=view& iid=".$row["image_id"]."\"></a> " '</td>';
    </tr>

    if ($this_no < $no_per_line)
    {
    $this_no++;
    }
    else
    {
    $str .= "<br />";
    $this_no = 0;
    }
    }
    print $str;
    }
    </table>';

    $total_results = mysql_result(my sql_query("SELE CT COUNT(*) as Num FROM dolls"),0);
    $total_pages = ceil($total_res ults / $max_results);

    echo "<center>Se lect a Page<br />";

    if($page > 1){
    $prev = ($page - 1);
    echo "<a href=\"".$_SERV ER['PHP_SELF']."?page=$prev\" ><<Previous</a> ";
    }

    for($i = 1; $i <= $total_pages; $i++){
    if(($page) == $i){
    echo "$i ";
    } else {
    echo "<a href=\"".$_SERV ER['PHP_SELF']."?page=$i\">$i </a> ";
    }
    }

    if($page < $total_pages){
    $next = ($page + 1);
    echo "<a href=\"".$_SERV ER['PHP_SELF']."?page=$next\" >Next>></a>";
    }
    echo "</center>";
    ?>
    [/PHP]
    [/HTML]
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    Only when you tell us what statement the error refers to.

    Ronald :cool:

    Comment

    • nwebhosting
      New Member
      • Oct 2006
      • 23

      #3
      Sorry sir.

      line 163 is exactly where I open <table>.

      Thanks.

      Comment

      • ronverdonk
        Recognized Expert Specialist
        • Jul 2006
        • 4259

        #4
        You seem to have a lot of parsing problems. At least, without seeing all the code, a statement like [php]<td>'$str .= "<a [/php] results in an error, because: where is the single quote coming from? If it is from an assignment, then close it with a semi-column. And you have this in a lot of statements.

        So, you'll better scan your code for usage of this single quote in your html tags. And also, if you code a td tag with a variable in an echo, you do it like [php]echo "<td>$var". ....[/php]

        Ronald :cool:

        Comment

        • vssp
          Contributor
          • Jul 2006
          • 268

          #5
          Can u get the view source of the display page and then get the line 163 I think u get the exact line to found the error

          vssp

          Comment

          Working...