Setting a Variable in PHP for use in rules I have a variable I've defined via rules using 'Add a variable' called 'minimum_reached'. This is available to me for use in custom PHP code.


if($total >= $minimum_fund){
   $minimum_reached = 'yes';
   dpm($minimum_reached, 'min reached');
}


Once this is set to 'yes', the next action fires which Sets a data value of the current node's 'minimum reached' field to yes (depending on that above outcome). The variable is being set as the dpm works, but it's not being carried across to the next action. How do you define this variable in PHP for use later on? Thanks.
The Rules module doesn't seem to provide this feature. 

I also tried using a rule set with a variable, but the variable was reset between each action. I tried adding return $minimum_reached at the end of each rule executing PHP code, but it didn't help.

The only way seems to use drupal_static(), if you are using Drupal 7 (e.g. with drupal_static('mimimum_reached', 'default value used when the variable is not set')), or a global PHP variable, if you are using Drupal 6.