WebBasic CMS
References

wbFromString()

getting DOM from string

wbFromString(string $str )

Function convert a string to a DOM object for later manipulation.

Arguments

$str
the string converted to DOM

Example

 
<?php 
    $obj=wbFromString("<div><p class="p1">1</p><p class="p2">2</p></div>"); 
    $res=$obj->find(".p2)->html(); 
    echo $res; // output value: 2 
?>