I have a string variable in PHP which is like
<html>
<body>
<div style="height: 10px; line-height: 10px;">
</div>
</body>
</html>
I want to split that String into two pieces
String 1
<html>
<body>
<div style="height: 10px; line-height: 10px;">
String 2
</div>
</body>
</html>
And then will insert some content into that DIV.
Note: Above string is just a sample to explain what I want, I have an HTML markup of 1000+ lines
As someone asked "What is your effort in PHP towards the query??"
$pieces = split('<div style="height: 10px; line-height: 10px;">', $template);
But it contains the whole markup not the splited one