SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    <? echo "Kick me"; ?> petesmc's Avatar
    Join Date
    Nov 2000
    Location
    Hong Kong
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    For my website, I would like to know how to to the things vbulletin does as in:

    [CODE ] Text [/CODE ]

    and

    [PHP ] PHP code hereand syntax highlight (MUST) [/PHP ]



    I wanna do the stuff so that none of the code within those tags are parse and so they are outputed in a different format, like vBulletin.

    Can anyone help me here?

    Peter

  2. #2
    Non-Member
    Join Date
    Apr 2000
    Location
    Waco, Texas.
    Posts
    188
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The [PHP ]....[/PHP] uses the highlight_string($foo) tag, where $foo contains PHP code. A simple regexp in your code would do it.

  3. #3
    <? echo "Kick me"; ?> petesmc's Avatar
    Join Date
    Nov 2000
    Location
    Hong Kong
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How would you make sure that the code isn't parsed?


Bookmarks

Posting Permissions

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