soltek Posted January 15, 2011 Share Posted January 15, 2011 Hey there, I was having that error message (Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in) in this line: echo "<td>" . $row['name'] . "</td>"; And fixed it with: echo "<td>" . $row[".name."] . "</td>"; It seems to work fine, but this is the right way? Thank you in advance. EDIT: Nop, it didnt do the job xD Link to comment https://forums.phpfreaks.com/topic/224534-parse-error-syntax-error-unexpected-t_string-expecting-or-in/ Share on other sites More sharing options...
Pikachu2000 Posted January 15, 2011 Share Posted January 15, 2011 Neither of those give me any parse errors, but this would be more concise, and less typing. echo "<td>{$row['name']}</td>"; Link to comment https://forums.phpfreaks.com/topic/224534-parse-error-syntax-error-unexpected-t_string-expecting-or-in/#findComment-1159821 Share on other sites More sharing options...
RichardRotterdam Posted January 15, 2011 Share Posted January 15, 2011 As mentioned both your lines should not produce a parse error. It's probably the line above the one you posted that causes an error Link to comment https://forums.phpfreaks.com/topic/224534-parse-error-syntax-error-unexpected-t_string-expecting-or-in/#findComment-1159822 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.