'; // concatenate the $lines array $final_lines = ""; foreach ($lines as $line) $final_lines .= $line . "\n\n"; // send a header to the browser, to show this as text instead of HTML header("Content-Type: text/plain"); // concatenate all the individual parts of the code and output it $sourcecode = $initial . $code . "\n" . // nowdoc syntax doesn't add the final newline $final_lines . $closing_tag; echo($sourcecode); code_end; $printing_function = create_function("", $code); $printing_function(); ?>