How to convert multiple
tag to a single
tag in php

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

Wanted to convert






into


9条回答
  •  清歌不尽
    2020-12-03 02:34

    Enhanced readability, shorter, produces correct output regardless of attributes:

    preg_replace('{(]*>\s*)+}', '
    ', $input);

提交回复
热议问题