In my PHP script, I have str1 (see the following code) coming from another page, but for simplicity I have copied its value in the code.
In the string str1, I want to add str2 just before the div #option_one_div, using simple_html_dom if needed.
How can I do that?
<?php
$str1 = '<div style="padding:25px;">
<div style="background-color:#d9b2b2;">
<label>Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah </label>
</div>
<div id="option_one_div" style="background-color:#74d4dd;">
<input style="margin-left:30px; margin-right:30px;" type="radio" name="radio" value="0">
<input style="margin-left:30px; margin-right:30px;" type="radio" name="radio" value="1">
<label style="margin-left:25px; margin-right:25px;" for="option_one_div">Label of first group of Radio Buttons</label>
</div>
<div id="option_two_div" style="background-color:#36d666;">
<input style="margin-left:30px; margin-right:30px;" type="radio" name="radio" value="0">
<input style="margin-left:30px; margin-right:30px;" type="radio" name="radio" value="1">
<label style="margin-left:25px; margin-right:25px;" for="option_two_div">Label of second group of Radio Buttons</label>
</div>
</div>';
$str2 = '
<div style="background-color:#bf5b5b; ">
<label style="margin-left:25px; margin-right:25px;">Yes</label>
<label style="margin-left:25px; margin-right:25px;">No</label>
</div>';
?>