Variable/array access question
| From: | Mitch Vincent | Date: | Thu, 24 Oct 2002 02:29:26 +0000 |
| Subject: | Variable/array access question | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-6222@lists.php.net to get a copy of this message | ||
I'm almost positive there is a way to get this to work --
{if $aSystem.form_error.$aCustomer.cust_name_name eq "blah"}
That blows a "[2] Illegal offset type" - which is fairly understandable as it thinks I'm trying to use an array as an array index instead of the "cust_name_name element of the aCustomer array"..
If I do this, it works fine, but I was wondering if there is some syntax I can add to the first idea to make it work correctly..
{assign var="cname" value=$aCustomer.cust_name_name}
{if $aSystem.form_error.$cname eq "blah}
^-- works fine.
Thanks!
-Mitch
Freedom is the right to be wrong, not the right to do wrong.