Here is an example of what to do.
HalfaBee
<?
$string = '<hr width="100%" size="1">';
$string2 = '<img src="http://www.url.com/">';
if( preg_match( '/<hr/',$string ) )
{
list($width,$size) = explode( ',',preg_replace( '/<.+?"([0-9]+?)%.+?"([0-9]+?)".*/',"$1,$2",$string ));
echo "width = $width size = $size ";
}
if ( preg_match( '/<img/',$string2 ) )
{
$url = preg_replace( '/<i.*?"(.+?)".*/',"$1",$string2 );
echo $url;
}
?>