Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Evaluation de variable assignée dynamiquement

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: French
View previous topic :: View next topic  
Author Message
comicway
Smarty Rookie


Joined: 14 Aug 2006
Posts: 8

PostPosted: Mon Aug 14, 2006 7:37 pm    Post subject: Evaluation de variable assignée dynamiquement Reply with quote

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
View user's profile Send private message
ciboulette
Smarty Regular


Joined: 13 Jul 2006
Posts: 45

PostPosted: Thu Aug 24, 2006 3:31 pm    Post subject: Reply with quote

personnelement j'ai pas compris le probleme tu peu etre un peu plus clair ?
Back to top
View user's profile Send private message
Guerre de Troy
Smarty Rookie


Joined: 24 Aug 2006
Posts: 6

PostPosted: Thu Aug 24, 2006 10:00 pm    Post subject: Reply with quote

$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
View user's profile Send private message
ciboulette
Smarty Regular


Joined: 13 Jul 2006
Posts: 45

PostPosted: Fri Aug 25, 2006 10:58 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: French All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP