I am trying to read the contents in from one file and search for a specific match with preg_match. The preg_match line is as follows:
preg_match("/<!-- COL1 START -->(.*)<!--COL1 END -- >/", $file, $contents);
$temp = $contents[1];
I would like to find the contents in between <!-- COL1 START --> and <!-- COL1 END -->
but when I ruch this I get the following error:
Warning: Undefined offset: 1 in f:\mitt.shadenet.net\phtml\textformat\display.php
Any help would be helpful. TIA