Possible duplicate:
Insert a line between two points using PHP
How can I replace everything between <!-- START NOT PRINT --> and <!-- END NO PRINT --> ?
The following code works well, but whenever there are two or more instances, it goes wrong.
Then it replaces everything between the first tag and the last tag. But he has to remove everything between two tags that belong to each other. This is my code:
$pageData['raw_content'] = preg_replace('/(.*)/si', '', $pageData['raw_content']);
source share