Check tag & get the value inside tag using PHP

后端 未结 2 1086
我在风中等你
我在风中等你 2021-01-29 11:24

I\'ve been confused. So here\'s my problem, I have a text like this :

Head of Pekalongan Regency, Dra. Hj.. Siti Qomariy         


        
2条回答
  •  有刺的猬
    2021-01-29 11:48

    Did you try the strip_tags() function?

    Head of Pekalongan Regency, Dra. Hj.. Siti Qomariyah , MA and her staff were greeted by Rector of IPB Prof. Dr. Ir. H. Herry Suhardiyanto , M.Sc. and officials of IPB in the guest room.";
    
        $r = strip_tags($s);
    
        var_dump($r);
    
    ?>
    

    demo

提交回复
热议问题