Hello All,
I'm passing an array to this function, which will loop through each file. I am trying to search the current file for the last </body> tag (there are many </body>'s) and I want to insert $code_to_insert right above the last </body> tag. Any ideas?
Thanks,
Allan
function InsertCode($ar_files)
{
$code_to_insert = "yaddayadda";
while (list ($key, $path) = each ($ar_files))
{
$fp = fopen("$path",'r+');
//SEARCH FROM BOTTOM OF STORY FOR </BODY>, WHEN
//IT IS FOUND, INSERT $code_to_insert ABOVE </BODY>
fclose($currentstory);
}
}