echo this line in php

Status
Not open for further replies.

hihotfile

Active Member
145
2010
35
0
usually i use ' ' , " " that for echo lines

but now i have little bit problem

How i echo this line

$line=<td class="play2Png"><a href="http://www.wjunction.com/" onclick="javascript:void window.open('http://www.wjunction.com','1349207004705','width=400,height=300,toolbar=0,menubar=0,location=0,status=1,scrollbars=1,resizable=1,left=0,top=0');return false;">Play Online</a></td>


this code is for pop up generate

after this i will replace

http://www.wjunction.com/with my $variable
 
Last edited:
9 comments
PHP:
$line="<td class='play2Png'><a href='http://www.wjunction.com' onclick=\"javascript:void w6indow.open('".$variable."','1349207004705',width=400,height=300,toolbar=0,menubar=0,location=0,status=1,scrollbars=1,resizable=1,left=0,top=0');return false;\">Play Online</a></td>";
 
PHP:
$line="<td class='play2Png'><a href='http://www.wjunction.com' onclick=\"javascript:void window.open('".$variable."','1349207004705',width=400,height=300,toolbar=0,menubar=0,location=0,status=1,scrollbars=1,resizable=1,left=0,top=0');return false;\">Play Online</a></td>";
echo $line;

Works for me..
if you want to print the html special chars...
use
PHP:
echo htmlspecialchars($line);
 
Or dont you want to parse the code, only display it? your not very clear

Read up on php.net to learn :D

PHP:
$variable = "http://wjunction.com";
highlight_string('$line=<td class="play2Png"><a href="'.$variable.'" onclick="javascript:void w6indow.open("'.$variable.'","1349207004705",width=400,height=300,toolbar=0,menubar=0,location=0,status=1,scrollbars=1,resizable=1,left=0,top=0");return false;">Play Online</a></td>');
 
usually i use ' ' , " " that for echo lines

but now i have little bit problem

How i echo this line

$line=<td class="play2Png"><a href="http://www.wjunction.com/" onclick="javascript:void window.open('http://www.wjunction.com','1349207004705','width=400,height=300,toolbar=0,menubar=0,location=0,status=1,scrollbars=1,resizable=1,left=0,top=0');return false;">Play Online</a></td>


this code is for pop up generate

after this i will replace

http://www.wjunction.com/with my $variable

easiest way would be
PHP:
echo <<<HTML
<td class="play2Png"><a href="http://www.wjunction.com/" onclick="javascript:void   window.open('http://www.wjunction.com','1349207004705','width=400,height=300,toolbar=0,menubar=0,location=0,status=1,scrollbars=1,resizable=1,left=0,top=0');return  false;">Play Online</a></td>
HTML;
 
Status
Not open for further replies.
Back
Top