preg_match多个单词php

时间:2019-05-07 20:12:27

标签: regex preg-match

如何preg_match多个单词来链接php

ilove php php ilove ilove 

替换

ilove php  = <a href="#1">ilove php</a>
php = <a href="#2">php</a>
ilove  = <a href="#3">ilove</a>

<a href="#1">ilove php</a>
<a href="#2">php</a>
<a href="#3">ilove</a>
<a href="#3">ilove</a>

0 个答案:

没有答案