Re: how to acces array keys that start with '#'

From: Date: Thu, 05 Apr 2007 21:17:27 +0000
Subject: Re: how to acces array keys that start with '#'
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-13701@lists.php.net to get a copy of this message
Have you tried $field['#value']? Of if that fails: {assign var='value' value='#value'} {$field.$value} Not pretty but should work. Jörg Hermsdorf wrote: > The drupal programmers use a lot array keys that start with '#' (e.g. > $field['#value'], $field['#weight'], $field['#description'], > ...). > How can I access such array elements from within a smarty template? > > If I use {$field.#value} I get a smarty syntax error: unrecognized tag. > > Using {$field.'#value'} or {$field.[#value]} or {$field.['#value']} > doesn't work either. Do I have to escape the # somehow? > > > > > > ___________________________________________________________ > Telefonate ohne weitere Kosten vom PC zum PC: > http://messenger.yahoo.de

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