I have text that is displayed from a database and I have managed to remove the first h3 tag in the text by using the following code but I would also like to remove the two <br> tags that are before the paragraph of text
<h2 class="productsummaryheading mb-0">Product Summary</h2>
<?php
$html= substr($description,0,strrpos(substr($description,0,300)," "));
$final = preg_replace('#<h3>(.*?)</h3>#', '', $html, 1);
echo $final;
?> ...<a href="<?php echo $_SERVER["REQUEST_URI"]; ?>#productdescription">Read More</a>
A example of the text paragraph is below
<br /> <br /> This 11.6” Chromebook is light, portable, rugged, and productive – the ultimate everyday learning tool. It brings Google Classroom, G Suite for Education, and today’s ...<a href="/shop/laptops-tablets/Laptops/lenovo-100e-chromebook-g2-laptop-11-6-celeron-n4020-4gb-32gb-emmc-webcam-wi-fi-no-lan-usb-c-chrome-os#productdescription">Read More</a>