I was reading this article. This function that it includes:
<?php
function getFirstPara($string){
$string = substr($string,0, strpos($string, "</p>")+4);
return $string;
}
?>
...seems to return first found <p> in the string. But, how could I get the first HTML element (p, a, div, ...) in the string (kind of :first-child in CSS).