Variable variables in templates?

From: Date: Sat, 15 Mar 2003 23:38:51 +0000
Subject: Variable variables in templates?
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-8672@lists.php.net to get a copy of this message
Hello... Is there a way to handle variable variables in templates? Now I write: {if $i == 1}{$smarty.capture.foo1} {elseif $i == 2}{$smarty.capture.foo2} {elseif $i == 3}{$smarty.capture.foo3} {elseif $i == 4}{$smarty.capture.foo4} {elseif $i == 5}{$smarty.capture.foo5} {elseif $i == 6}{$smarty.capture.foo6} {elseif $i == 7}{$smarty.capture.foo7} {elseif $i == 8}{$smarty.capture.foo8} {/if} But something like that would be nicer: {$smarty.capture.foo$i} I tried different things with "assign" and "eval" but nothing works :( Bye... Nagger

« previous php.smarty.general (#8672) next »