woodsonoversoul Posted July 20, 2007 Share Posted July 20, 2007 I'll start off by saying sorry, I know this is a dumb question I should know the answer to, but I don't, so my problem is getting this output: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /var/www/spindex/display.php on line 56 Which is a reference to this block of code: 52 echo $row[0]; 53 echo "category location price"; 54 echo "<table cellpadding=10 border=1>"; 55 while($row = $result->fetch_array()) { 56 echo "<div id="navcontainer">"; 57 echo "<ul>"; 58 echo "<li>".$row[2]."</li>"; 59 echo "<li>".$row[3]."</li>"; 60 echo "<li>".$row[4]."</li>"; 61 echo "<li><a 62href=".$_SERVER['PHP_SELF']."?id=".$row[0].">Delete</a></li>"; 63 echo "</ul>"; 64 echo "</div>"; Any help would be appreciated. I'm trying to list the contents of a row in a straight line and dabling in some CSS. It was working when it was all in php. How do I fix this? Quote Link to comment Share on other sites More sharing options...
TheFilmGod Posted July 20, 2007 Share Posted July 20, 2007 you have double quotes between the php double quotes. Use single quotes Quote Link to comment Share on other sites More sharing options...
me102 Posted July 20, 2007 Share Posted July 20, 2007 Replace line 56 with echo "<div id=\"navcontainer\">"; Quote Link to comment Share on other sites More sharing options...
TheFilmGod Posted July 20, 2007 Share Posted July 20, 2007 61 echo "<li><a 62href=".$_SERVER['PHP_SELF']."?id=".$row[0].">Delete[/url]</li>"; same problem. Here you must escape the double quotes. DO NOT USE SINGLE QUOTES. Single quotes = no interpolation. Quote Link to comment Share on other sites More sharing options...
woodsonoversoul Posted July 20, 2007 Author Share Posted July 20, 2007 I've had problems with double/single quotes before. I thought I had solved it, I guess not. Thanks again, that fixed me up Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.