FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Parsing Error
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Parsing Error [message #172794 is a reply to message #172793] Wed, 02 March 2011 16:38 Go to previous message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma:
Senior Member
Thomas 'PointedEars' Lahn wrote:
> Mike Copeland wrote:
>
>> Parse error: syntax error, unexpected T_STRING, expecting ']'
>> in /home/content/94/6213994/html/contact.php on line 47
>> […]
>> "\n\nComments: \n{$_POST['add_comments]}";
> ^ ^starts here, never ends
> `starts here
>> $eml_result = mail($to, $subject, $from, $body1);
>> if($eml_result)
>> {
>> do_msg("<br>Your info has been submitted.<br><br>");
>> }
>> else
>> {
>> do_msg("<br>There was a problem.<br>");
>> }
>> }
> ^ends here
>> ?>
>
> The error message is a bit bogus. The reason is that in the first quoted
> code line here the inline array reference subscript was not finished with an
> apostrophe. As a result, PHP considers the subscript to not have ended
> until it reaches the last closing brace (at line 47), supposedly to end the
> inline reference.
>
>

...and is most easily spotted if you use a text editor with some
intelligence (I use geany) that turns the hole page end orange..(its all
a string)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: HTML select field where the OPTION text is of different colors
Next Topic: Dynamic Charting Assistance Requested
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Oct 21 05:22:47 GMT 2024

Total time taken to generate the page: 0.03740 seconds