SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Apr 2006
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    help creating custom tags

    Hi
    Im trying to create a page where the member should be able to edit their own (page) but its just a html table.

    Like

    <BGCOLOR=#000000> changes color on the background
    <BIG>text</BIG> text gets large.
    <TEXTCOLOR=#FFFFFF>text</TEXTCOLOR>


    Has anyone done such thing before cuz i have no idea how to.
    Would gladly apprecíate if someone could help me out.

    Best Regards
    Trevors

  2. #2
    SitePoint Addict Kokos's Avatar
    Join Date
    Nov 2005
    Location
    The Netherlands
    Posts
    205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you could achieve this by using str_replace, if you would want to change <big> and </big> into <h2> and </h2> use this code:
    PHP Code:
    str_replace("<big>","<h2>",$text);
    str_replace("</big>","</h2>",$text); 
    This code will change all the <big> and </big> tags to <h2> and </h2> in $text.
    Making them large

    Taking over the web one pixel at a time.
    Currently working @ CodeCreators

  3. #3
    SitePoint Member
    Join Date
    Apr 2006
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by KoKoSNOOT
    you could achieve this by using str_replace, if you would want to change <big> and </big> into <h2> and </h2> use this code:
    PHP Code:
    str_replace("<big>","<h2>",$text);
    str_replace("</big>","</h2>",$text); 
    This code will change all the <big> and </big> tags to <h2> and </h2> in $text.
    Making them large
    I think im gonna have to use regex because if some tags dont end it might mess up the whole website.

    Best Regards
    Trevors


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
  •