Return to Snippet

Revision: 34604
at October 26, 2010 03:37 by newsok


Initial Code
function get_tag( $tag, $xml ) {
  $tag = preg_quote($tag);
  preg_match_all('{<'.$tag.'[^>]*>(.*?)</'.$tag.'>.'}',
                   $xml,
                   $matches,
                   PREG_PATTERN_ORDER);

  return $matches[1];
}

Initial URL

                                

Initial Description

                                

Initial Title
Matching a XML/HTML tag

Initial Tags
xml

Initial Language
PHP