How to assign new values to keys in hash?

Author Message

Aaron Weiss

Wednesday 24 March 2004 11:55:52 am

I'm just getting the hang of the EZ template language. I'm familiar with coding in Perl/PHP, etc. Basic question: I have created a hash like this:

{let myhash=hash('key1','val1')}

How can I change the value for key1? I've tried all kinds of variations like:
$myhash[key1]="val2"

But this doesn't work. I tried some of the array functions like merge but that didn't work either. Ideas?

thanks!
Aaron

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 18 2025 19:03:18
Script start
Timing: Jan 18 2025 19:03:18
Module start 'layout'
Timing: Jan 18 2025 19:03:18
Module start 'content'
Timing: Jan 18 2025 19:03:19
Module end 'content'
Timing: Jan 18 2025 19:03:19
Script end

Main resources:

Total runtime0.7967 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0119 589.3516152.6406
Module start 'layout' 0.01190.0052 741.992239.4766
Module start 'content' 0.01710.7783 781.4688401.1875
Module end 'content' 0.79540.0013 1,182.65638.1250
Script end 0.7966  1,190.7813 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.4898160.0002
Check MTime0.00140.1769160.0001
Mysql Total
Database connection0.00110.132210.0011
Mysqli_queries0.751394.3073460.0163
Looping result0.00080.0991440.0000
Template Total0.752494.420.3762
Template load0.00280.346220.0014
Template processing0.749694.096220.3748
Template load and register function0.00020.029210.0002
states
state_id_array0.00150.187910.0015
state_identifier_array0.00090.116620.0005
Override
Cache load0.00230.2862100.0002
Sytem overhead
Fetch class attribute can translate value0.00090.115910.0009
Fetch class attribute name0.00070.094010.0007
XML
Image XML parsing0.00010.015110.0001
class_abstraction
Instantiating content class attribute0.00000.000610.0000
General
dbfile0.00180.2259100.0002
String conversion0.00000.001640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 8
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs