Actually, that is not the problem. Strings delimited by double quotes (") are subject to string interpolation. As such, the output of these are identical
$var = 123;
echo "var is \"$var\" <br/>";
echo "var is \"" . $var . "\" <br/>";
Not being a fan of escaped quotes, single or double, I'd personally prefer using a single quoted string, which is not subject to string interpolation.
echo 'var is "' . $var . '"<br/>';
You could of course go the other way as well which makes for cleaner code in this case, but it also means you might have to start using regexp to find all links with target blank since some have target="blank" while others have target='blank'
echo "var is '$var'<br/>";
Or why not use heredoc syntax?
echo <<<EOS
var is "$var"<br/>
EOS
However, turning back to the initial problem, there is no 'target="_blank" in the output. Also, do note the difference between what you posted, php code, as opposed to what was asked for, the generated html code. In this case it made no difference to find the actual error, but understanding the difference between the php code you write and the code it generates is important.