Redcoder-- That did actually work (THANKS!), but to a point... where is it getting the text that rendered before/after the table on the page-- see link here:
http://dstone1029.net/box-office-analyst-dev/
Quote:
Originally Posted by Redcoder
You have done a lot of stuff wrong. You have used the HEREDOC wrongly, dropped into and out of PHP and HTML code terribly.
The following will probably not work as you wanted your code to work because I do not see the rest of your code but it should start you off as to how you should drop into and out of PHP code.
PHP Code:
<p>
</p>
<p><!-- Import and render trailer links {{{-->
<?php
print <<< HERE
<table width="100%" class="table1">
<tr>
<th id="mythead" style="text-align:left; font-size:12px;">Film Title </th>
<th id="mythead" style="text-align:left; font-size:12px;">Release Date</th>
</tr>
<p>
</p>
<p>
HERE;
$data = file("http://dstone1029.net/textuploads/trailers.txt");
foreach ($data as $line){
$lineArray = explode("|", $line);
print <<<CODE
</p>
<p>
CODE;
list($moviename, $releasedate, $trailerlink) = $lineArray;
print <<<HEREP
<tr>
<td id="leftcell" style="color:#0000ff; font-size:12px;"> <a style="color:#0000ff;" href="$trailerlink" target="youtube">$moviename</a></td>
<td id="leftcell" style="font-size:12px;">$releasedate</td>
</tr>
<p>
HEREP;
}
// end foreach
print <<<CODE
</p>
<p>//print the bottom of the table
print "</table>
<p> \n";</p>
<p><!-- Trailer links rendering end }}}-->
</p>
CODE;
?>
|