Results 1 to 3 of 3

Thread: Parse Pairs...? [resolved]

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2003
    Posts
    255

    Parse Pairs...? [resolved]

    Okay, I'm currently developing my forums, and I want to create tags (like [quote] and all) because I don't want to allow people to screw with the site using HTML. I want to parse only PAIRS of tags (open and close), so that 2 close tags (say, for [quote]) won't end up shifting the tables in some odd way. I've tried this using a wacky and long method of strstr, substr, and strlen, along with some other things, but that didn't work. Just wondering if anyone knew how to do this, and if you do, I'd like you to explain, not just give me the code. Thanks.
    Last edited by R.a.B.B.i.T; Aug 10th, 2004 at 01:27 AM.

  2. #2
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    The best way is it use preg_replace() and regular expressions. See my post here
    My evil laugh has a squeak in it.

    kristopherwilson.com

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jul 2003
    Posts
    255
    Thank you.

Posting Permissions

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



Click Here to Expand Forum to Full Width