try this
echo "
<a href='test.htm' onclick=\"NewWindow(this.href,'test','400','300','no','center');return false\" onfocus='this.blur()'>YourLinkText</a> ";
OR
you could just stop the php tags and print as HTML
eg
$blah = 2314;
?>
<a href="test.htm" onclick="NewWindow(this.href,'test','400','300','no','center');return false" onfocus="this.blur()">YourLinkText</a>
<?
more php
hope this helps
Al