Remove HTML formatting

I was looking for functionality to remove the html tags from text (i.e. anything of this format <*>). I’m sure there’s a built-in PHP function to do this, but I couldn’t find one, so I made a function:

function get_plaintext($in){
//goes from < to the next > and removes it.
return stripslashes(preg_replace('/\< [^>]+\>/','',$in));


  1. gravatar

    Paolo Said,

    September 12, 2005 @ 10:43 am


  2. gravatar

    Raybdbomb Said,

    September 12, 2005 @ 11:07 am

    You mean


    good call

  3. gravatar

    posicionamiento en buscadores Said,

    April 1, 2017 @ 7:01 pm

    Estaba buscando esa informacion hace espacio, te lo agradezco, estoy
    de pacto con tu punto de vista y pienso igual. Despues de buscar mucho por Internet encontre lo
    que buscaba. Genial!!! muchas muchas gracias

  4. gravatar

    alex vargas Said,

    January 27, 2018 @ 9:43 pm

    Manual Completo Para Criação de Conteúdos – R$ 47. https://bgemanufacturing.co.za/products/item/20-mesh-bags

RSS feed for comments on this post · TrackBack URI

Leave a Comment