Simply filter the HTML tags in a string. FunctiondeleteHtml ($ scr) {$ lstrlen ($ scr); for ($ i0; $ I $ l; $ I ++) {if (substr ($ scr, $ I, 1) {current position $ ii $ I; stop the loop function deleteHtml ($ scr) when $ I is greater than the character length)
{
$ L = strlen ($ scr );
For ($ I = 0; $ I <$ l; $ I ++)
{
If (substr ($ scr, $ I, 1) = "<")
{
// Current location
$ Ii = $ I;
// Stop the loop when $ I is longer than the character length
While (substr ($ scr, $ I, 1 )! = ">" & $ I <$ l)
$ I ++;
// At the end of the large string, reset $ I to the start position of '<'.
If ($ I = $ l)
{
$ I = $ ii-1;
// Indicates that the string ends.
$ B = 1;
}
$ I ++;
}
// When the next character is not '<', the character is accepted; otherwise, $ I --, starting from this '<'
If (substr ($ scr, $ I, 1 )! = '<' | $ B = 1)
$ Str = $ str. substr ($ scr, $ I, 1 );
Else
$ I --;
}
Return ($ str );
}
Http://www.bkjia.com/PHPjc/317540.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/317540.htmlTechArticlefunction deleteHtml ($ scr) {$ l = strlen ($ scr); for ($ I = 0; $ I $ l; $ I ++) {if (substr ($ scr, $ I, 1) = "") {// Current position $ ii = $ I; // stop the loop when $ I is longer than the character length...