Forum Moderators: coopster
exmple.php
<title><?=$title?></title>
<body>
<?
echo $body;
echo "copyright $c exapmle.com";
?>
extract.php
<?
$file = file_get_contents("example.php");
$pattern = "?"; //find everything starting with a $ until there is a break in the alphanumeric sequence
preg_match_all($pattern,$file,$out);//$out would now be an array that contains "title", "body", and "c"
I would really appreciate help with the pattern