I'm trying to store some popup code in a variable, but I'm having trouble with escaping the quotes I think. What I have is:

PHP Code:
 $popcode "<SCRIPT LANGUAGE=\"JavaScript\" src=\"http://64.27.100.65/btest.js\"></SCRIPT>"
$popcode .= "<SCRIPT LANGUAGE=\"JavaScript\">"
$popcode .= "if (tP == 1) {"
$popcode .= "document.write('<SCRIPT LANGUAGE=\"JavaScript\" src=\"http://www.popuptraffic.com/assign.php?l=jimday1982\"><\/script>');"
$popcode .= "}"
$popcode .= "else"
$popcode .= "document.write('<SCRIPT LANGUAGE=\"JavaScript\" src=\"http://www.popuptraffic.com/assign.php?l=jimday1982&mode=layers\"><\/script>');"
$popcode .= "</SCRIPT>" 
The error I'm getting is: Parse error: parse error, unexpected T_VARIABLE in /home/day1982/public_html/index.php on line 4

Can anyone tell me what I'm doing wrong?