You are here: Re: [SMARTY] dots in variable names « Smarty Templates Posts « IT news, forums, messages
Re: [SMARTY] dots in variable names

Posted by "messju mohr" on 06/03/05 15:08

On Fri, Jun 03, 2005 at 01:45:44PM +0200, Atte André Jensen wrote:
> Suppose I have the following in php:
>
> $array = array('some.test' => 'text', 'more' => 'simple');
> $smarty->assign('array', $array);
>
> How do I then address the variable "some.test" in my template?

you can't. stick to [a-zA-Z0-9_] for variablenames.

> Opviously
> {$array.some.test} doesn't work since this is addressing a sub-array...
>
> --
> peace, love & harmony
> Atte
>
> http://www.atte.dk
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация