View Single Post
Old 12-27-2012, 04:16 PM   PM User | #4
Redcoder
Regular Coder

 
Redcoder's Avatar
 
Join Date: May 2012
Location: /dev/couch
Posts: 309
Thanks: 2
Thanked 46 Times in 45 Posts
Redcoder has a little shameless behaviour in the past
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>
    &nbsp;
</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;
?>
__________________
For professional Hosting and Web design.....


NetEssentials.co.uk
Redcoder is offline   Reply With Quote