Forum Moderators: coopster
sorry for the silly question, as i'm just learning php but can't quite figure this out. am trying to place an include file in the statement below:
---------------
echo <<<End
<tr><td >blah blah</td></tr>
<? include("include-file.php");?>
<tr><td >blah blah</td></tr>
<table>
End;
$script = $_SERVER['PHP_SELF'];
echo <<<End
<form action="$script" method="POST">
End;
-------------------------
The include file doesn't seem to be working though. I'm sure this is a silly syntax error - do you see what i'm doing wrong? Many many thanks!
Have you tried:
echo <<<End
<tr><td >blah blah</td></tr>include("include-file.php");
<tr><td >blah blah</td></tr>
<table>
End;
$script = $_SERVER['PHP_SELF'];
echo <<<End
<form action="$script" method="POST">
End;
dc
Try this instead (PS, "End" might not be the best termination word):
echo <<<EOT
<tr><td >blah blah</td></tr>
EOT;
include("include-file.php");
echo <<<EOT
<tr><td >blah blah</td></tr>
<table>
End;
$script = $_SERVER['PHP_SELF'];
echo <<<End
<form action="$script" method="POST">
EOT;