Re: HEREDOC help, going quietly nuts



Rik Wasmus wrote:
On Sat, 20 Oct 2007 17:44:48 +0200, bill <nobody@xxxxxxxxxxx> wrote:

with this code:
------------------------------------------
$sql = "select * from do_be_do where do_be_id = '$GET[id]' limit 1";
$result = mysql_query($sql, $connection) or die (mysql_error());
$row = mysql_fetch_array ($result);
$title = stripslashes($row['title']);
$depends = stripslashes($row['depends']);

$detail<<<eoxd
<form action="do_detail_save.php" method="post">
...
eoxd;
----------------------------
(the elipses (...) represent code left out of the posting

I get the compile error:
Parse error: syntax error, unexpected T_START_HEREDOC in ....at line 54.

line 54 is the line after: $detail<<<eoxd

I can't see an error.

Think of heredoc as alternative quotes

What would the error be in:
$detail 'foo';

yup, just needed the = sign.

Thanks all - I have been looking at this code too long !

bill
.



Relevant Pages

  • Re: HEREDOC help, going quietly nuts
    ... represent code left out of the posting ... I get the compile error: ... Parse error: syntax error, unexpected T_START_HEREDOC in ....at line 54. ...
    (comp.lang.php)
  • HEREDOC help, going quietly nuts
    ... represent code left out of the posting ... Parse error: syntax error, unexpected T_START_HEREDOC in ....at line 54. ... If I put an echo statement just before the heredoc there is no compile error, so I presume that the script is ok up to that place. ...
    (comp.lang.php)
  • Re: HEREDOC help, going quietly nuts
    ... represent code left out of the posting ... Parse error: syntax error, unexpected T_START_HEREDOC in ....at ... heredoc there is no compile error, so I presume that the script ...
    (comp.lang.php)
  • RE: BandwidthD syntax error?
    ... Subject: BandwidthD syntax error? ... Opening dc0 ... Syntax Error "parse error" on line 40 ... This electronic transmission, ...
    (freebsd-questions)
  • BandwidthD syntax error?
    ... I just installed bandwidthd, and I get the following error when I try to ... Opening dc0 ... Syntax Error "parse error" on line 40 ...
    (freebsd-questions)

Loading