trying to use PHP extract() within a function
- by samuelf
Hi,
I have the two following files:
main.php
include("functions.php")
__EXTRACT();
echo $testvar;
functions.php
function __EXTRACT(){
extract($_POST, EXTR_SKIP);
}
However, having a form with a textbox called testvar I can't get the extract function to extract the data.. if I remove the function call and insert it the extract statement directly into main.php it works. The include is not a problem as other functions in it works. Any ideas?
Cheers