Results 1 to 4 of 4

Thread: strip out all html tags from a string

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2006
    Posts
    147

    strip out all html tags from a string

    im trying to get rid of all html from a string. this is what i have so far

    PHP Code:
    $Data ereg_replace("/<.*>/i"""$Data); 
    Last edited by penagate; Apr 3rd, 2007 at 12:34 PM. Reason: fixed code tags

  2. #2
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: strip out all html tags from a string

    try

    php Code:
    1. $text = "(html code here)";
    2. strip_tags($text);
    My usual boring signature: Something

  3. #3
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    Re: strip out all html tags from a string

    You could just try strip_tags()

    -- Ryan
    My Blog.

    Ryan Jones.

  4. #4
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: strip out all html tags from a string

    little late there
    My usual boring signature: Something

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