/ Published in: PHP
                    
                                        
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
function get_tag( $attr, $value, $xml, $tag=null ) {
$tag = '\w+';
else
$tag_regex = "/<(".$tag.")[^>]*$attr\s*=\s*".
"(['\"])$value\\2[^>]*>(.*?)<\/\\1>/"
$xml,
$matches,
PREG_PATTERN_ORDER);
return $matches[3];
}
Comments
 Subscribe to comments
                    Subscribe to comments
                
                