How to convert multiple
tag to a single
tag in php

后端 未结 9 1266
执念已碎
执念已碎 2020-12-03 02:03

Wanted to convert






into


9条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-03 02:27

    Mine is almost exactly the same as levik's (+1), just accounting for some different br formatting:

    preg_replace('/(]*>\s*){2,}/', '
    ', $sInput);

提交回复
热议问题