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 #172793 is a reply to message #172753] Wed, 02 March 2011 16:10 Go to previous messageGo to previous message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma:
Senior Member
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.


PointedEars
--
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee
[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: Sat Nov 23 07:15:31 GMT 2024

Total time taken to generate the page: 0.04191 seconds