<?php
$html = '<p>Paragraaf</p><h1>Kop 1</h1><h2>Kop 2</h2>';
echo $html;
echo PHP_EOL;
echo PHP_EOL;
$html = preg_replace('#<p>.*<\/p>#','',$html);
echo $html;
- Output for 5.5.0 - 5.5.37, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.31, 8.2.0 - 8.2.26, 8.3.0 - 8.3.15, 8.4.1 - 8.4.2
- <p>Paragraaf</p><h1>Kop 1</h1><h2>Kop 2</h2>
<h1>Kop 1</h1><h2>Kop 2</h2>
preferences:
60.87 ms | 408 KiB | 5 Q