I have an ereg function I wish to run against a string but the expression I wish to search for will change dependant on the variables set up in a config file.
eregi("$startOfNews(.*)$endOfNews", $wholeNewsSite, $outputreg);
The above does not work but if I substitute the $startOfNews and $endOfNews variables for the conent of the variables it works fine.
Can anyone think of a way of getting the content of the variables in there without actually putting the variables in there?
Any help would be much appreciated.
Thanks
Emdee