preg_replace
如图所示。在原来的基础上增加一个img标签 地址参数调用前面超文本的参数。
另外一段代码有很多个这样的结构标签 我都要替换。 不能用array了吧?
回复讨论(解决方案)
$html = <</i', $html, $match);foreach ($match[0] as $key => $value) { $newValue = $value."\n"; $html = str_replace($value, $newValue, $html);}var_dump($html);