Trying to eumulate SSI technology...this is what I have:
Code: Select all
preg_match_all('/<!--#include="(.+)" -->/', $buff, $matches, PREG_PATTERN_ORDER);a) The full match
b) The stuff in the (.+)
I need to replace the full match, so having that would make using str_replace alot easier. I also don't want to parse the result so having the filename available is kinda nice
I have tried each flag with no luck...what am I doing wrong or what is wrong with my regex???
These are the result I am getting:
Code: Select all
Array
(
[0] => Array
(
[0] =>
[1] =>
)
[1] => Array
(
[0] => includes/header.tpl
[1] => includes/footer.tpl
)
)Thanks