PHP, preg_replace, replace tag with tag attr

后端 未结 2 1543
谎友^
谎友^ 2021-01-27 06:09

Can I have a detail explain about how can I replace with tag with current attr using php?

I read manual and some referencs

How to use php preg_replace to replac

2条回答
  •  滥情空心
    2021-01-27 06:56

    You need to learn about regular expressions, this site is a useful resource;

    A quick example with preg_replace could be something like this - it could be improved, but hopefully will give you the idea...

    ';
    $pattern = '/
    
                                     
                  
提交回复
热议问题