IT Community - Software Programming, Web Development and Technical Support

.Debugging php ..What does this mean " Parse error: parse error, unexpected.......

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?...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > PHP Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 07-26-2007, 03:40 AM
oxygen oxygen is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 633
oxygen is on a distinguished road
Question .Debugging php ..What does this mean " Parse error: parse error, unexpected.......

.Debugging php ..What does this mean " Parse error: parse error, unexpected T_STRING ...." ..on line 4?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-26-2007, 03:41 AM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 882
kingmaker is on a distinguished road
Send a message via Yahoo to kingmaker
Default Re: .Debugging php ..What does this mean " Parse error: parse error, unexpected......

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 }).
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Parse error,unexpected T_STRING Murali PHP Programming 4 11-07-2007 05:37 AM
Why do I get Error message "Unable to Start Debugging" Error Message? a.deeban ASP and ASP.NET Programming 5 09-25-2007 12:22 AM
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 04: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 04: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 04:38 AM


All times are GMT -7. The time now is 07:34 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0