Title: Variable from PHP.
Last modified: December 5, 2018

---

# Variable from PHP.

 *  Resolved [frilansmagi](https://wordpress.org/support/users/frilansmagi/)
 * (@frilansmagi)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/variable-from-php/)
 * Hi,
 * I have followed the guide and got it up and running. But how would i do if i 
   in want to echo a varible and not a string?
 * instead of:
    `{{ pll_e("Test text on TWIG template 1.") }}`
 * I want to:
    `{{ pll_e(my.twig.var) }}`

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Marcin Kazmierski](https://wordpress.org/support/users/marcinkazmierski/)
 * (@marcinkazmierski)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/variable-from-php/#post-10970287)
 * Hi,
    it is not possible because the plugin has got a string scanner. Scanner 
   finds strings to translate in code of plugins or themes which are used in pll_e
   or pll__ functions.
 *  [Messaone](https://wordpress.org/support/users/messaone/)
 * (@messaone)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/variable-from-php/#post-11309089)
 * So i have same problem i have a array which i loop trough:
 *     ```
       <?php foreach ($array as $variable) {
             pll_e($variable'); 
       }; ?>
       ```
   
 * It echo the variable right but i can’t see any string to translate.
 *  Plugin Author [Marcin Kazmierski](https://wordpress.org/support/users/marcinkazmierski/)
 * (@marcinkazmierski)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/variable-from-php/#post-11309114)
 * Polylang function pll_e() do not support variables, only clear strings.
 *  [Messaone](https://wordpress.org/support/users/messaone/)
 * (@messaone)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/variable-from-php/#post-11309437)
 * Maybe something to report at polylang? 😉
    I write a ticket, i think that could
   be a nice feature.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Variable from PHP.’ is closed to new replies.

 * ![](https://ps.w.org/theme-translation-for-polylang/assets/icon-256x256.png?rev
   =1431912)
 * [Theme and plugin translation for Polylang (TTfP)](https://wordpress.org/plugins/theme-translation-for-polylang/)
 * [Support Threads](https://wordpress.org/support/plugin/theme-translation-for-polylang/)
 * [Active Topics](https://wordpress.org/support/plugin/theme-translation-for-polylang/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/theme-translation-for-polylang/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/theme-translation-for-polylang/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Messaone](https://wordpress.org/support/users/messaone/)
 * Last activity: [7 years, 2 months ago](https://wordpress.org/support/topic/variable-from-php/#post-11309437)
 * Status: resolved