|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
Dânêl Smarty n00b
Joined: 27 Dec 2007 Posts: 4
|
Posted: Thu Dec 27, 2007 11:11 am Post subject: how to set an array in conf file |
|
|
Hi,
I'm using smarty to make one my project easier to develop, in particular ,obviously, regarding templates.
But I have a problem. I need to set an array in the .conf file, but I don't know how I can do this. I tried to search, but I haven't found an answer....can you help me?
thanks in advance |
|
Back to top |
|
Dânêl Smarty n00b
Joined: 27 Dec 2007 Posts: 4
|
Posted: Fri Jan 04, 2008 6:36 pm Post subject: |
|
|
no one can help me? |
|
Back to top |
|
no0n Smarty Rookie
Joined: 31 Aug 2007 Posts: 21
|
Posted: Fri Jan 04, 2008 6:46 pm Post subject: |
|
|
How about :
someArray = "first,second,third"
And split on ',' ? |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
|
Back to top |
|
Dânêl Smarty n00b
Joined: 27 Dec 2007 Posts: 4
|
Posted: Mon Jan 07, 2008 6:50 pm Post subject: |
|
|
thanks no0n but someArray = "first,second,third" defines a string variable containing first,second,third but not an array
I'm going to try the $config_overwrite alternative...
There is an unaswared FAQ about defining config variable as an array...I thought there isn't a solution...but now I know that and I say THANKS FOR THE HELP
PS but with this solution if I would to define an associative array or multidimensional array, there is a way to do this?
Pease don't ban me for so many questions |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Mon Jan 07, 2008 9:16 pm Post subject: |
|
|
Hi.
My link shows how to create a indexed array. Associative arrays in config files are not supported. |
|
Back to top |
|
Dânêl Smarty n00b
Joined: 27 Dec 2007 Posts: 4
|
Posted: Fri Jan 11, 2008 3:42 pm Post subject: |
|
|
thanks boots |
|
Back to top |
|
|
|
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
|