Jason --

...and then Jason k Larson said...
% 
% My first question back would be why you create on array with keys you 
% know you want to change, or why in that case it became necessary to 
% dereference the original key.

A fair question :-)

I'm writing a picture gallery add-on which will allow users to create
"favorite pictures" baskets.  For each basket, the user throws in a bunch
of pictures in an array.  Then I make an array of baskets, where the name
of the basket is the key and the array that is the basket is the value.

When a user wants to rename a basket, the new version of that basket
appaers at the bottom of the list instead of in its original place --
wherever that was.


% 
% $a['tmp'] =& $a['t']; // exact same values by reference (no copy)

I don't think I can do this, since I eventually save the array of arrays
to a file for the user to reload on another visit.  Thanks, though.


% 
% Only other way I can think of at the moment is to create a copy and 
% unset the original as you described as brute force.

Ah.  Well, that's what they get, then :-)


% 
% HTH,
% Jason k Larson


Thanks & HAND

:-D
-- 
David T-G                      * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/      Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

Attachment: msg93747/pgp00000.pgp
Description: PGP signature

Reply via email to