As with echo, you can define a variable like this:
<?php
$text = <<<END
<table>
<tr>
<td>
$outputdata
</td>
</tr>
</table>
END;
?>
The closing END; must be on a line by itself (no whitespace).
[EDIT by danbrown AT php DOT net: This note illustrates HEREDOC syntax. For more information on this and similar features, please read the "Strings" section of the manual here: http://www.php.net/manual/en/language.types.string.php ]