news_publish.php
***
)(.*?)(<\/NEWS>)/i","\\1$news\\2",
$templine));
print ($templine);
}
fclose ($tempfile);
}
$template_dir="/php/work/boz";
$template_filename="news";
$news="SOME STUFF GOES HERE BUILD IT AS A VAR";
DoTemplate($template_dir,$template_filename);
?>
***
Sorry I wasn't clear. I need to search for the combo
in an html file. Thats why I asked for a regex. So I need to
load in the html SEARCH for the tags and anything in between the tags throw out
and REPLACE with the contents of a variable and then
rewrite the file. My orginal message follows:
> I
I've been trying this one for a bit and Im in a twist.
I need to replace ANYTHING or even nothing between two tags
with the contents of a variable and just havent been
able to get the expression right for all cases.
As an example concept follows:
Nothing between the tags variable is $varname
3 matches
Mail list logo