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? Link to comment https://forums.phpfreaks.com/topic/60895-solved-simple-simple-question/ 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 Link to comment https://forums.phpfreaks.com/topic/60895-solved-simple-simple-question/#findComment-303022 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\">"; Link to comment https://forums.phpfreaks.com/topic/60895-solved-simple-simple-question/#findComment-303030 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. Link to comment https://forums.phpfreaks.com/topic/60895-solved-simple-simple-question/#findComment-303034 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 Link to comment https://forums.phpfreaks.com/topic/60895-solved-simple-simple-question/#findComment-303070 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.