I have a feeling the answer is \"it\'s not possible,\" but thought I\'d ask to satisfy my curiosity.
I have some code that\'s echoed where the \\n is unavoidable:
<
If the output target is HTML then extra spaces don't matter - browsers don't render multiple, contiguous spaces (which is why we have
)
If the output target is something else, then you can simply cleanup the output. As you can see from other replies, there are a myriad of ways to do this. It seems like you're working with echo statements so the output-buffering functions will be the route you want to take.
ob_start();
echo "Hello \n";
echo "World!";
$output = preg_replace( "/ +/", ' ', str_replace( "\n", ' ', ob_get_clean() ) );
echo $output;