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 Quote 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>"; Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.