Forums / Setup & design / adding values to hash

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

adding values to hash

Author Message

Marko Žmak

Thursday 21 April 2005 11:41:57 pm

How can I add new (key,value) pairs to an existing hash?

Here's what I want to do:

- create a hash $myhash

{let myhash=hash( name, 'John')}
...

- later in the code add a pair (surname, 'Smith') to $myhash. The equivalent in PHP would be:

$myhash{'surname'} = 'Smith'

I tried doing this in many ways but it just won't work. Is there any way to do this? And I need a precise sollution for this, not any workarounds.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Marko Žmak

Saturday 23 April 2005 3:42:43 pm

Does anyone know the sollution to this problem???

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Marko Žmak

Tuesday 26 April 2005 4:48:19 pm

Still no anwser... Is there ANY sollution for this? Should I post it to another forum?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Tuesday 26 April 2005 11:15:25 pm

Hi,

Maybe this helps:
http://ez.no/community/forum/general/how_to_assign_new_values_to_keys_in_hash
http://ez.no/ez_publish/documentation/development/libraries/ez_template/operators/array_handling