I have a string that i want to split it to array with
delimiter. But i don't want to lose these delimiters and i want them to be a part of array.my string is something like below:
$str = "<h3>hello</h3>this is my test and <h3><span>bye</span></h3>";
and what i want to reach is this:
array(
'<h3>hello</h3>',
'this is my test and ',
'<h3><span>bye</span></h3>'
);
enter code here
is there any way to do it?
thanks for your help in advance.