Defining a varibale Node Expire date by custom PHP code in Rules module I have a content type, Job Offer, and this node type is able to expire thanks to Node Expire module.

When editing a Job Offer, I want to change the expire date by the value of the Duration field that I added to this node. 

In order to do this, I made a rule with the help of Rules Module and I am using the custom PHP code below as an action in the light of this post, but it did not work with my field:

$node-&gt;expire = date('Y-m-d', strtotime("+[node:field-duration:field-value] days"));
return array("node" =&gt; $node);



node:field-duration:field-value is an integer field of a taxonomy term


Any help would be appreciated.
Thanks
Thanks to @undersound, the code below worked!

$duration = [node:field-duration:field-value];
$node-&gt;expire = date('Y-m-d', strtotime("+" . $duration . " days"));
return array("node" =&gt; $node);