Support forum login

©2006-2012 IAAI Software

Contact Us Privacy Policy

record output as variable for another function..

Submitted by sahertian on Wed, 2008-10-08 12:42.

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

Submitted by support on Wed, 2008-10-08 14:48.

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.