header

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));
}



7 Comments »

  1. gravatar

    Paolo Said,

    September 12, 2005 @ 10:43 am

    http://php.net/striptags

  2. gravatar

    Raybdbomb Said,

    September 12, 2005 @ 11:07 am

    You mean

    http://php.net/strip_tags

    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

  5. gravatar

    Zara Said,

    March 22, 2018 @ 11:18 pm

    E que levaria outros ao conhecimento dessa fórmula. http://callielindsey.com/2015/02/rich-farms-wedding-smithfield-pennyslvania-photography/

  6. gravatar

    https://www.dailystrength.org/ Said,

    April 7, 2018 @ 12:50 am

    Grande feitas page, o Layout gosta de mim muito! Foi certamente muita esforço. https://www.dailystrength.org/journals/catalogo-para-caminho-sainha-pagina-da-internet-ninja-e-adultera

  7. gravatar

    seguro viagem familia Said,

    November 15, 2018 @ 4:22 pm

    Nós utilizamos seguro do cartão de crédito. http://p-w.fr/y1buh+

RSS feed for comments on this post · TrackBack URI

Leave a Comment

blogtimes