Is there any way I can increment a variable for each replacement in a preg_replace() statement?
So basically if I have something like:
And after preg_replace() I would like to get:
<div id="cut_1">Text one</div>
<div id="cut_2">Text two</div>
with that incrementing "cut_1" and "cut_2" part.