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

Search found 2 matches
Smarty Forum Index
Author Message
  Topic: accessing associative arrays
rtaranu

Replies: 4
Views: 78675

PostForum: Feature Requests   Posted: Fri Jan 12, 2007 7:44 pm   Subject: Re: accessing associative arrays

how about {$array.`foo-bar`} ? i never use special chars in a var name, then u get these probs. an _ should work better.

{$array.`foo-bar`} does not work
{$array.'foo-bar'} does not work

The ...
  Topic: accessing associative arrays
rtaranu

Replies: 4
Views: 78675

PostForum: Feature Requests   Posted: Fri Jan 12, 2007 3:06 pm   Subject: accessing associative arrays
It is very cumbersome to access values for array keys that do not follow php variable naming conventions.

Example

in php:
$array = array('foo-bar' => 'hello, world');
$smarty->assign('ar ...
 
Page 1 of 1
All times are GMT
Jump to:  


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