I have been searching for a number of hours now for a solution to remove a block of text within a file using PHP script.
There appears to be a number of options for removing lines of text, but not a block of text. I have attempted to use preg_replace ("/^$start.*?$end/s", $replace, $fdata) with the following, but have not found a solution that works.
I am sure that someone has done this already, so any help would be much appreciated.
$start = "# Copyright 2000-";
$end = "Agreement.";
# This software product may only be used strictly in accordance
# with the applicable written License Agreement.