XML_Transformer, showing PHP-Code

From: Date: Tue, 14 Jan 2003 21:42:03 +0000
Subject: XML_Transformer, showing PHP-Code
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-12439@lists.php.net to get a copy of this message
Hi y'all! First i'd like to point out, that i tried XSLT for about 2 weeks and got no acceptable result from that. After that i tried now the XML_Transformer for about 1 day and the result is much more than acceptable. It's really great. Thanks to Sebastian and Kristian. Pretty good work. Okay, but this is not the only reason for writing (indeed it would be one *g*). I tried outputing some PHP-Code wich i would like to add as examples to the files i create. E.g. i'd like to write something like: <code> <?php echo "foo"; ?> </code> and the result should be like: <?php echo "foo"; ?> But this did not work in any way. I tried replacing the "<" and ">" with "&lt;" and "&gt;". I even tried to write only "?php" and "?" instead of "<?php" and "?>" and replacing that with "&lt;?php" and "?&gt;". But this doesn't work either. Can somebody tell me, how to solve this? Thanks a lot to you all! Regards, Toby -- <?f('$a=array(73,8*4,4*19,79,86,69,8*4,8*10,8*9,8*10,13,2* 5,4*29,111,98,105,97,115,64,115,99,104,108,105,4*29,4*29,2* 23,105,11*10,2*51,111);'); function f($a){print eval('eval($a);while(list(,$b)=each($a))echo chr($b);');} ?>

« previous php.pear.dev (#12439) next »