B
Bioperler
HI!
Actually I'm about to code a tool, that's able to track users of a
website (using cookies). However, I've got a problem with the sorting of
the data. I need a data structure like this:
%hash(array(array)) "hash of an array of an array"
So for testing purposes I generated a small dataset, which looks like this:
%HoAoA = (
hash1 => [
( [ "first", "second" ],
[ "third" , "fourth" ],
[ "fifth" , "sixth" ]
)
],
hash2 => [
( [ "9th", "10th" ],
[ "11th" , "12th" ]
)
]
);
So while it was no problem to acces all data fields using nested loops,
I was not able to append data to these arrays listed above. Array's push
doesn't seem to work for this.
Example of what I want to do:
push($HoAoA{hash1}[2], "seventh");
Any suggestions?
Actually I'm about to code a tool, that's able to track users of a
website (using cookies). However, I've got a problem with the sorting of
the data. I need a data structure like this:
%hash(array(array)) "hash of an array of an array"
So for testing purposes I generated a small dataset, which looks like this:
%HoAoA = (
hash1 => [
( [ "first", "second" ],
[ "third" , "fourth" ],
[ "fifth" , "sixth" ]
)
],
hash2 => [
( [ "9th", "10th" ],
[ "11th" , "12th" ]
)
]
);
So while it was no problem to acces all data fields using nested loops,
I was not able to append data to these arrays listed above. Array's push
doesn't seem to work for this.
Example of what I want to do:
push($HoAoA{hash1}[2], "seventh");
Any suggestions?