Hi all
I am trying to get my script to re-run if a particular criteria is met. What i want to happen is i want my script to execute but if the preg_match of a variable is true (it returns 1) i want it to re-run the script.
script name: bsecond.php
<?php
................
$mzt = preg_match('/Never/is',$datatwo);
IF ($mzt = 1){
exec("c:\php\cli\php.exe -f c:\scripts\created\bsecond.php\");
}
?>
so basically if the word Never is present in the variable $datatwo then re-run the script
If i comment out the exec statement, and manually execute the script again, it works fine. But if i uncomment it, and run hte script, i am getting an unexpected $end at the very last line (?>).
Not too sure whats happening... any idaes?
thx!