Search code examples
phpdrupaldrupal-7

Use token in php code on drupal site


I am using some tokens in my drupal site.

I have some php code where i need to use the token.

print '[token]';

This works perfect but i need to use it in a function like

myfunctionname('[token]') {
}

This doesn't work. How can u use this token in php code without using the print function. I am trying to encode the string wit a special function. So i must use the value from that token as parameter in the function.


Solution

  • I solved the problem by adding some token on the simplenews tokens. Thanks for your help anyway.