This is a discussion on .Debugging php ..What does this mean " Parse error: parse error, unexpected....... within the PHP Programming forums, part of the Web Development category; .Debugging php ..What does this mean " Parse error: parse error, unexpected T_STRING ...." ..on line 4?...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| .Debugging php ..What does this mean " Parse error: parse error, unexpected T_STRING ...." ..on line 4? |
|
#2
| |||
| |||
| That error makes it seem like line 4 contains a string in a place where it shouldn't. But you can scrutinize line 4 all you want to find a problem with it, and you won't find one. That line, print "Welcome, $first_name"; is perfectly correct: the string is correctly delimited with double quotes and the line appropriately ends with a semicolon. When you get a parse error from the interpreter, first take a look at the line reported in the parse error. Check for the basics, such as making sure that you've got a semicolon at the end of the statement. If the line seems OK, work your way forward and back a few lines in the program to hunt down the actual error. Pay special attention to punctuation that goes in pairs: single or double quotes that delimit strings, parentheses in function calls or test expressions, square brackets in array elements, and curly braces in code blocks. Count that the number of opening punctuation marks (such as (, [, and {) matches the number of closing punctuation marks (such as ), ], and }). |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Parse error,unexpected T_STRING | Murali | PHP Programming | 4 | 11-07-2007 04:37 AM |
| Why do I get Error message "Unable to Start Debugging" Error Message? | a.deeban | ASP and ASP.NET Programming | 5 | 09-24-2007 11:22 PM |
| I get the error message "Unable to start debugging on the web server..." when I debug | oxygen | ASP and ASP.NET Programming | 1 | 07-20-2007 03:50 AM |
| I get the error "The page cannot be displayed" and an HTTP 502 Proxy Error. Why? | kingmaker | ASP and ASP.NET Programming | 1 | 07-20-2007 03:43 AM |
| Why do I get "HTTP 500" error(or "(DLL)initialization routine failed")in my browser? | kingmaker | ASP and ASP.NET Programming | 1 | 07-20-2007 03:38 AM |
Our Partners |