Setting values to arrays

Author Message

Piotr Kwiatkowski

Sunday 06 June 2004 10:45:56 pm

Is it possible to assign values to an array after it has been created?

{let myarray=array()}
{set myarray[3]=5}
{/let}

This, doesn't work.
If it's possible, how sould we do it?

Trond Åge Kvalø

Tuesday 08 June 2004 6:48:55 am

Hi Piotr!

Have you tried this?

http://ez.no/ez_publish/documentation/reference/template_operators/arrays/insert

best regards
trondåge

trondåge

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 06:19:28
Script start
Timing: Jan 31 2025 06:19:28
Module start 'layout'
Timing: Jan 31 2025 06:19:28
Module start 'content'
Timing: Jan 31 2025 06:19:28
Module end 'content'
Timing: Jan 31 2025 06:19:28
Script end

Main resources:

Total runtime0.0292 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 588.1328151.2109
Module start 'layout' 0.00600.0026 739.343836.6484
Module start 'content' 0.00860.0190 775.992290.1563
Module end 'content' 0.02750.0017 866.148429.9922
Script end 0.0292  896.1406 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00258.6511140.0002
Check MTime0.00113.8348140.0001
Mysql Total
Database connection0.00072.566010.0007
Mysqli_queries0.003010.233230.0010
Looping result0.00000.037510.0000
Template Total0.00113.910.0011
Template load0.00093.018110.0009
Template processing0.00020.821610.0002
Override
Cache load0.00062.105110.0006
General
dbfile0.011338.721680.0014
String conversion0.00000.024540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs