For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > April 2007 > how to acces array keys that start with '#'









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author how to acces array keys that start with '#'
Jörg Hermsdorf

2007-04-05, 7:17 pm

The drupal programmers use a lot array keys that start with '#' (e.g. $fiel=
d['#value'], $field['#weight'], $field['#description'], ...).=0AHow can I a=
ccess such array elements from within a smarty template?=0A=0AIf I use {$fi=
eld.#value} I get a smarty syntax error: unrecognized tag.=0A=0AUsing {$fie=
ld.'#value'} or {$field.[#value]} or {$field.['#value']} doesn't work eithe=
r. Do I have to escape the # somehow?=0A=0A=0A=0A=0A=0A=0A=09=0A=09=09=0A__=
________________________________________
_________________ =0ADer fr=FChe Vo=
gel f=E4ngt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.=
yahoo.de
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com