Re: [SMARTY] write out data from array
| From: | Monte Ohrt | Date: | Tue, 25 Mar 2003 14:31:15 +0000 |
| Subject: | Re: [SMARTY] write out data from array | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-8888@lists.php.net to get a copy of this message | ||
> - use $array[$key] for numeric indices
> - use $array.$key for associative array
> - read about this at:
> http://smarty.php.net/manual/en/language.variables.php#LANGUAGE.ASSIGNED.VARIABLES
> - don't ask me why smarty distinguishes between the two types
When Smarty was first written, $foo[bar] syntax was created for section
loops. Then the ability to access associative vars via $foo.bar was
added at a later date, and direct numerical $foo[0] even later.
Monte