Var into myRecordHandler
Submitted by antitrust56 on Thu, 2008-12-04 14:07.Magic Parser
Hello,
I want to know if it possible to include a var into the function myRecordHandler.
function myRecordHandler($record) {
echo $record[$var1]."<br>";
}José
Hello José,
Certainly - as long as $var1 is declared global, and is the value of a field name that you are expecting within $record; for example:
$var1 = "MYFIELD";function myRecordHandler($record) {
global $var1;
echo $record[$var1]."<br>";
}
Hope this helps!
Cheers,
David.