|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
comicway Smarty Rookie
Joined: 14 Aug 2006 Posts: 8
|
Posted: Mon Aug 14, 2006 7:37 pm Post subject: Evaluation de variable assignée dynamiquement |
|
|
Bonjour à tous
Voila j'ai une petite question
j'assigne une variable comme ceci:
$smarty->assign("mavariable","test");
$smarty->assign("variable_test","{$mavariable}");
et je voudrai que dans mon template lors de l'éxécution on voit à la place de {$mavariable} test
Donc que la variable assignée soit interprétée par php.
Merci d'avance pour votre aide. |
|
Back to top |
|
ciboulette Smarty Regular
Joined: 13 Jul 2006 Posts: 45
|
Posted: Thu Aug 24, 2006 3:31 pm Post subject: |
|
|
personnelement j'ai pas compris le probleme tu peu etre un peu plus clair ? |
|
Back to top |
|
Guerre de Troy Smarty Rookie
Joined: 24 Aug 2006 Posts: 6
|
Posted: Thu Aug 24, 2006 10:00 pm Post subject: |
|
|
$smarty->assign('variable_test',$mavariable);
Comme cela ca devrait marcher _________________ www.guerre-de-troy.com
Last edited by Guerre de Troy on Sat Aug 26, 2006 4:27 pm; edited 1 time in total |
|
Back to top |
|
ciboulette Smarty Regular
Joined: 13 Jul 2006 Posts: 45
|
Posted: Fri Aug 25, 2006 10:58 am Post subject: |
|
|
ba ton code ci dessou serre a rien.
si tu veux que mavariable et variable_test est la meme valeur tu fait
Code: |
$mavar = "test";
$smarty->assign("mavariable",$mavar);
$smarty->assign("variable_test",$mavar);
|
|
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|