My guess is that PHP is catching on the re-opening of the php tag <?php
, try splitting just that:
$str2 = "<?" . "php print( \$myVar$myVar2 ); ?>";
Or use single quotes and concatenation:
$str2 = '<?php print( $myVar' . $myVar2 . ' ); ?>';
Cryo
2010-03-03 23:21:54