3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = <<<str <td width="551"> <p><strong>Full Time Faculty<br> <strong></strong>Assistant Professor</strong></p>Doctorate of Business Administration<br><br> <strong>Phone</strong>: +88 01756567676<br> <strong>Email</strong>: frank.wade@email.com<br> <strong>Office</strong>: NAC739<br> <br><p><b>Curriculum Vitae</b></p></td> str; // We explode $str and use '</strong>' as delimiter and get only the part of result that we need $lines = array_slice(explode('</strong>', $str), 3, 3); // Define a function to remove extra text from left and right of our so called lines function stripLine($line) { // ltrim ' ;' characters and remove everything after (and including) '<br>' return preg_replace('/<br>.*/is', '', ltrim($line, ' :')); } $lines = array_map('stripLine', $lines); print_r($lines);
Output for 7.1.0 - 7.1.25, 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.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.25, 8.4.1 - 8.4.12
Array ( [0] => +88 01756567676 [1] => frank.wade@email.com [2] => NAC739 )

preferences:
137.31 ms | 408 KiB | 5 Q