i did'nt know that you needed to evalute the two strings, but here is the easy way to evalute.
$string1 = 'begin';
$string2 = 'End';
$php_code = '<? echo "my world" ?>'.$string1.','.$string2,' continue';
// This will display as it is.
echo $php_code
[b]
Output:
[/b]
<? echo "my world" ?>begin,End continue