Apparently PHP differs from Perl far more than I thought and it doesn't seem to parse my variables in an echo line.
echo '
<table cellpadding="0" cellspacing="0" border="0" style="position: relative; top: -5px;">
<tr>
<a href="$scripturl?action=markasread;sa=all;sesc=$context[\'session_id\']">MARK ALL MESSAGES AS READ</a>
</tr>
</table>';
It literally prints $context, not the data, plus $scripturl and the box []
If you use double quotes PHP can echo the value of the variable, for single quotes break out of the string then concatenate the variable like I've done here.
echo '
<table cellpadding="0" cellspacing="0" border="0" style="position: relative; top: -5px;">
<tr>
<a href="' . $scripturl . '?action=markasread;sa=all;sesc=' . $context['session_id'] . '">MARK ALL MESSAGES AS READ</a>
</tr>
</table>';
Oh wow, that's quite a disheartening fact about PHP then. I guess that's why most state and government offices still refuse to see it as a respectable language. Even something as trivial interpolation has to be removed from a print statement.
I do appreciate the help, I'll put it into action, but wow. It's almost like JavaScript all over again.
Like I said, if you had used echo with double quotes it would have been fine.
echo "show me my $string please";