View Single Post
  #2 (permalink)  
Old 07-26-03, 05:50 AM
Skeleton Man Skeleton Man is offline
Community Liaison
 
Join Date: Jun 2003
Location: Australia
Posts: 406
Thanks: 0
Thanked 0 Times in 0 Posts
Try this (assuming the file with the tags in it is tags.txt):

PHP Code:

<?

$lines 
file("tags.txt");

foreach (
$lines as $line){
 if (
preg_match("/%%(\w+)%%/",$line,$match)){
  
$last $match[1];
 }else{
  if (
$last){ ${$last} .= $line; }
 }
}

print 
"Meta1: $meta1<br>\n";
print 
"Meta2: $meta2<br>\n";
print 
"Tag: $tag<br>\n";
print 
"Changes: $changes";
?>
__________________
Chris (aka Skeleton Man)
ProgrammingTalk's Perl/PHP Moderator !
Reply With Quote