Chevy Posted November 5, 2006 Share Posted November 5, 2006 How do you display PHP on a .php page without it actually doing anything example is right here...[code]<?phpecho 'Like this';?>[/code] Quote Link to comment Share on other sites More sharing options...
trq Posted November 5, 2006 Share Posted November 5, 2006 [code=php:0]echo "<?php";echo "echo 'Like this';";echo "?>";[/code] Quote Link to comment Share on other sites More sharing options...
Orio Posted November 5, 2006 Share Posted November 5, 2006 If you output php, it wont be phrased unless you use eval().Orio. Quote Link to comment Share on other sites More sharing options...
Chikenty Posted November 5, 2006 Share Posted November 5, 2006 areyou tryin to display text u type or like database info? Quote Link to comment Share on other sites More sharing options...
Chevy Posted November 5, 2006 Author Share Posted November 5, 2006 [quote author=thorpe link=topic=113906.msg463240#msg463240 date=1162739984][code=php:0]echo "<?php";echo "echo 'Like this';";echo "?>";[/code][/quote]Didn't workHere is my file:[code]<?phpinclude("top.php");echo "<?php";echo "echo 'How have you been?';";echo "?>";echo '<br><br>That is a PHP code';include("footer.php");?>[/code] Quote Link to comment Share on other sites More sharing options...
alpine Posted November 5, 2006 Share Posted November 5, 2006 I think you are looking for the highlight_string function, outputs syntax colored code:[code]<?php$source = "<?php echo 'Hello World!'; ?>";echo highlight_string($source,true);?>[/code] Quote Link to comment Share on other sites More sharing options...
Chevy Posted November 5, 2006 Author Share Posted November 5, 2006 Thank you so much, alpine!Have a good day! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.