简体   繁体   中英

assign smarty variable in php / mysql query

I am working in phpfox.I want to use smarty variable in mysql query. I have searched a lot and apply all methods / solutions available in stackoverflow but its not working.

Use get_template_vars to get template variable in php code

$myVar = $smarty->get_template_vars('aPin');
echo $myVar.ITEMID;

Also try get_template_vars() to get the list of all assigned variables

$myvar = $smarty->get_template_vars();
print_r($myvar);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM