Here is the code I am trying to make work. As you can see, the code as it stands will call a javascript window. All of that works well. I now want to add the lines that are commented out, in order to make the window display conditionally. I have tried many combinations of escaping quotation marks, or substituting them, but nothing works properly. Usually I lose the link action along with a display of some of the code attached to the link. Could someone have a look and see if they can propose a solution.
<?php
//if ($review != 0)
//$yes2 =
if ("{$row['passState']}" == 0) {echo "<a href='javascript:void(0);'NAME='var basestring='window'+new Date().getTime();' title=' Results of quiz 'onClick=window.open('check/check.php?quizTitle=". urlencode($quizTitle) ."', 'width=1100, height=510, resizable=yes, menubar=no, status=0, scrollbars=1');> <p>Check your answers</p> </a><br />\n";}
//echo $yes2;
//if ($review != 1)
//echo "";
?>
If it is any help, I'm using the following code elsewhere on the page and it works fine.
<?php
if ($review != 0)
$yes2 = "REVIEW";
echo $yes2;
if ($review != 1)
echo "";
?>
I'm really banging my head on this one.