Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Nov 2011
    Location
    London
    Posts
    31
    Thanks
    5
    Thanked 1 Time in 1 Post

    Write php code that users can see to teach them

    I need to show a php code on my website to tell people how to print "hello world. My problem is that because the page i am trying to show it on is a php file it hides the coding i am trying to show people.

    i've tried...
    PHP Code:
    <?php highlight_string('<?php print ("Hello world");?>'); ?>
    and
    PHP Code:
    <?php print ('<?php print ("Hello world");?>'); ?>
    Any ideas?

  • #2
    New Coder
    Join Date
    Dec 2011
    Posts
    67
    Thanks
    20
    Thanked 1 Time in 1 Post
    Put the PHP code you want people to see inside a HTML text area.

  • #3
    Regular Coder
    Join Date
    Jan 2012
    Posts
    134
    Thanks
    0
    Thanked 32 Times in 32 Posts
    That, or use the htmlentities function.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •