';?> $patern) return "invalid patern"; $f[0] = ""; while(list($key, $line) = each($f)) { $line = trim($line); if (substr($line, 0, 1) == "[") { $file = trim(substr($line, 1, -1)); if (isset($tag)) $fct($file, $tag); $item = $file; $tag = array(); } else if (ereg("^#", $line)) echo "\n".$line; else if ($line <> '') { list($field, $value) = explode("=", $line); $field = trim($field); $value = trim($value); $tag[$field] = $value; } } } ?> $url = 'http://packs.shtooka.net/fra-balm-voc/flac/index.tags.txt'; function echoTag($key, $tag) { echo "\n"; while (list($field, $value) = each($tag)) echo "\n $value"; echo "\n\n\n"; } parseIndexTag("\\Swac_Index_Tags", $url, "echoTag"); ?>