Troubleshooting "Parse error: syntax error, unexpected T_STRING" in echo statement

Posted by dramaticlook on Stack Overflow See other posts from Stack Overflow or by dramaticlook
Published on 2012-06-09T23:24:58Z Indexed on 2012/06/10 22:40 UTC
Read the original article Hit count: 286

Filed under:
|

I am back to php after like 5 years and I need help with the following please:) It keeps telling me the error: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in header.php (in the first echo invoke)

<?php
$result = mysql_query("SELECT * FROM menu WHERE disabled=0 ORDER BY orderx ASC") or die(mysql_error());
$i=1;
while($row = mysql_fetch_array($result)) {

    echo "<li class='sddm'.$i.' '.$row[extra].'"><a href="'.link_text($row[link]).'" onmouseover=\"mopen('m2')\" onmouseout=\"mclosetime()\">'.link_text($row[link]).'</a>";
    echo "<div id='m2' onmouseover='mcancelclosetime()' onmouseout='mclosetime()'>";
    echo "<a href='#'>ASP Dropdown</a>";
    echo "<a href='#'>Pulldown menu</a>";
    echo "<a href='#'>AJAX dropdown</a>";
    echo "<a href='#'>DIV dropdown</a>";
    echo "</div>";
    echo "</li>";

    <!--echo '<li class="sddm'.$i.' '.$row[extra].'"><a href="'.link_text($row[link]).'">'.$row[title.langfix()].'</a>';-->
    echo'</li>';
    $i++;

}
?>

© Stack Overflow or respective owner

Related posts about php

Related posts about echo