How is posible that for som $template
preg_match("/(SEC).SEC/U",$template,$ar) is TRUE but preg_match("/(SEC).\1/U",$template,$ar) is FALSE
???? Stranger in a strange land!
preg_match("/(SEC).*\1/U",$template,$ar)
is the right command. You need the double b-slash in front of the digit.
Either that or
preg_match('/(SEC).*\1/U',$template,$ar) use single quotes.
May you never be thirsty.
Thanks Ben. You save my weekend. :-)))