record output as variable for another function..
Submitted by sahertian on Wed, 2008-10-08 12:42.Magic Parser
Hi David,
How can I use the a certain record output (ex: print $record["NAME"]) from parse function A as variable into another parse function B?
Thanks Ron
Hello Ron,
All you need to do is use global variables to transfer data from one function to another. For example:
<?php$name = "";
function myRecordHandlerA($record)
{
global $name;
$name = $record["name"};
}
function myRecordHandlerB($record)
{
global $name;
// here you can use $name from handler A!
}
?>
Hope this helps,
Cheers,
David.