Anyone having probs with echo <<<EOF with PHP4
| From: | Sanders, Nicholas | Date: | Tue, 22 Aug 2000 14:29:41 +0000 |
| Subject: | Anyone having probs with echo <<<EOF with PHP4 | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-2261@lists.php.net to get a copy of this message | ||
I was just about to send this email with the problem below when I thought I
had better have a 2nd look to check I hadn't done anything stupid. Anyway I
found the answer I had spaces after '<<<FILE' before the new line and once I
had deleted those it worked fine.
I hope this might save someone else wasting 1 hour hair pulling.
Nick
I'm having erratic problems using echo <<<EOF sometimes it works fine but on
some pages I end up using it more than 10 times and I get the following
error.
Parse error: parse error, expecting
','' or ';'' in
/home/websites/msd-revamp/admin_ford_specific.php on line 147
Where line 147 is the 'echo' line below
echo <<<FILE
<tr>
<td>Title : </td>
<td>
<input type="text" name="title" size="40"
maxlength="50"
value="$row[title]">
</td>
</tr>
FILE;