I've got this snippet of code that I will be replacing in various places and I was wondering how would I write the pattern to preg_replace it? Thanks!
<div class="leftside item1">
<label for="item1">Item1</label>
</div>
I'd like to replace it with:
<div class="leftside item1">
<label for="item1">Item1</label>
</div>
<div class="rightside item1_select">
<select class="item1_select" id="item1_select">
<option value="">Select one</option>
<option value="1">1</option>
<option value="2">2</option>
</select>