if you put a backslash before your charachter, it 'escapes' it - which basically means that it ignores it.
So you can use double quotes quite happily thus:
echo "This text will appear normally<br>\n";
echo "This text contains \"speech\" in it too<br>\n";
I think also that enclosing an echo in double quotes means that it will 'parse' the text in the quotes:
$i = "Some string";
echo "1. This is double quoted, and outputs $i<br>\n";
echo '2. This is single quoted, and outputs $i<br>\n';
If you run that, then the first will have "Some string" instead of the $i outputted, but the second will just display $i.
If in the 1. you wanted it to say $i (and not 'Some string'), then again you could escape the $ sign by placing a \ in front of it:
echo "1. This is double quoted, and outputs \$i<br>\n";
Give them a whirl and you'll see what I mean.
As for subprocs, you can use functions for them (I think...)
function html_headers($title)
{
$output = "";
$output .= "<html>\n";
$output .= "<head>\n";
$output .= "<title>$title</title>\n";
// note that I just used $title because of the double quotes
$output .= "</head>\n";
return $output;
}
echo html_headers("This is the title of the page!");
...but there's probably a better way of doing that too. Oh, and of course you'd want more in your html header (doc type etc) but that's just an example!