6
$content = preg_replace('#(.*?)#is', '$2
', $content);

preg_replace '' with '
'?

请求翻译

I have my code removing the

starting tags, but now I want to replace the ending

tags with line breaks. How can I do this?

This is what I have:

$content = 'This is the content';
$newcontent = preg_replace("/]*?>", "", $content);
$newcontent = preg_replace("", "
", $newcontent);

2个回答

6
$content = preg_replace('#(.*?)#is', '$2
', $content);
(????)?"""