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

Thread: PHP Coloring?

  1. #1
    Regular Coder Rappa's Avatar
    Join Date
    Nov 2005
    Location
    LI
    Posts
    356
    Thanks
    21
    Thanked 9 Times in 9 Posts

    PHP Coloring?

    I didnt really know what to call this thread, so i figured PHP coloring, although vague, represents what im about to ask.

    You know the way the code gets formatted on these forums, when its put between [PHP] tags, like all the different elements get different colors.

    I was wondering if there was anyway I could implement that on my site. Like i post some code and it automaticlly does that for me.

    Any help would be nice.

  • #2
    Banned
    Join Date
    Apr 2007
    Posts
    428
    Thanks
    29
    Thanked 5 Times in 5 Posts
    higlight string
    PHP Code:
    <?php
    $str
    =  "<?php 
        echo \"Hello world!\";
    ?>"
    ;
    echo 
    highlight_string ($str'true' );
    ?>
    Also escape $ if you have one.. (\$)

  • #3
    Regular Coder Rappa's Avatar
    Join Date
    Nov 2005
    Location
    LI
    Posts
    356
    Thanks
    21
    Thanked 9 Times in 9 Posts
    awesome thanks, ill give it a try!


  •  

    Posting Permissions

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