Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Invalid attribute "key" in foreach

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Bugs
View previous topic :: View next topic  
Author Message
aurum
Smarty n00b


Joined: 26 Feb 2004
Posts: 2

PostPosted: Thu Feb 26, 2004 11:25 am    Post subject: Invalid attribute "key" in foreach Reply with quote

Hi,

I get an error message if I used the key attribute in a foreach. I tried the orginal example, too and it gives me same error:

Code:
{foreach name=outer item=contact from=$contacts}
  {foreach key=key item=item from=$contact}
    {$key}: {$item}<br>
  {/foreach}
{/foreach}


Error:
Code:
Smarty error: [in main_gui/lockdirForm.tpl line 39]: syntax error: invalid attribute name
Back to top
View user's profile Send private message
aurum
Smarty n00b


Joined: 26 Feb 2004
Posts: 2

PostPosted: Thu Feb 26, 2004 11:29 am    Post subject: Reply with quote

Oh, I'm terrible sorry, I was stupid, I leaved a $ sign in the code.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Bugs All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP