Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Variable variable

 
Post new topic   Reply to topic    Smarty Forum Index -> Language: French
View previous topic :: View next topic  
Author Message
proxi
Smarty n00b


Joined: 12 Feb 2014
Posts: 1

PostPosted: Wed Feb 12, 2014 3:11 am    Post subject: Variable variable Reply with quote

Bonjour,

Est ce qu'il y aurai l'équivalent de ${"aaa"} dans Smarty

En fait, j'ai une série de case à cocher dans un formulaire.
Leur identifiant est "case_X" ou X est un n° séquentiel.
Exemple:
<input name="case_{$x}" id="case_{$x}" type="checkbox" value="1" {$checked} />

Mon problème est quand je veux tester leur valeur lorsqu'on ré affiche le formulaire.
J'aimerais utiliser quelque chose comme ca:
if(${"case_" . $x}=="1") { $checked="checked='checked'" }

Merci pour votre aide

Marco
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    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