Share » Forums » Developer » Howto show content of an array

Howto show content of an array

Howto show content of an array

Sunday 11 January 2004 6:53:11 am - 2 replies

Author Message

Shurbann Martes

Thursday 15 January 2004 2:08:44 am

Are there no way of showing the content of an array?

[code]

{let test=array(1,2,3) }
{$test}

[/code]

This one won't work cause, the ouptut will only show that this is an array. Is there a method that show what's inside the array?

-Shurbann

James Packham

Thursday 15 January 2004 2:52:14 am

$test[0] will show you the first value, $test[1] the second... etc

Or you can find out what the array contains by using

{$test|attribute(show)} you can change the depth it shows like this {$test|attribute(show,1)} for 1 level deep, {$test|attribute(show,2)} for two levels deep..... etc

You can find more about arrays here:

http://www.ez.no/developer/ez_publish_3/documentation/development/libraries/ez_template/operators/array_handling

Regards,

~James~

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu