Categories > TinyButStrong general >

Array element

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: httprefresh
Date: 2009-10-15
Time: 15:31

Array element

Hey folks,

I use tbs for a business management software and I first would like to thank the developers for this amazing template system (way better than anything else I've tested so far).

Anyways I've got a problem: I would like to retrieve a single Array element without merging the whole array
and it doesn't work like it does with a normal variable.

[onload.arrayname['key']]
doesn't work.

Am i missing anything? I can't find a solution in the documentation. But probably I'm just blind
after 12 hours of coding :).

Thanks in advance and excuse my bad English (I'm German).

so long
By: Skrol29
Date: 2009-10-15
Time: 16:05

Re: Array element

Hi,

It is: [onload.arrayname.key]
By: httprefresh
Date: 2009-10-15
Time: 16:06

Re: Array element

omg ^^ simple as that?

thanks a lot Skrol29
By: TomH
Date: 2009-10-15
Time: 16:07

Re: Array element

Sorry if I'm not understanding you intentions... but
would not php code
$somevar = $arrayname['key'];
with template code
[var.somevar]
do that for you?

By: TomH
Date: 2009-10-15
Time: 16:08

Re: Array element

Duh...
By: httprefresh
Date: 2009-10-15
Time: 16:24

Re: Array element

of course it would tomH...

but why should I if i already have the array because I work with it in the php code?
Dunno if its that weird but I try not to use more variables than needed, because the application is going to be used by over 200 customers at the same time and it works with about 25.000 contact informations...

so long