ID:               25237
 Updated by:       [EMAIL PROTECTED]
 Reported By:      gavin at itmerge dot com
-Status:           Open
+Status:           Wont fix
 Bug Type:         Feature/Change Request
 Operating System: Linux
 PHP Version:      4.3.3
 New Comment:

As you proved yourself, it can be done easily with PHP code.
Post those funcs as manual notes instead, maybe someone finds them
useful too.



Previous Comments:
------------------------------------------------------------------------

[2003-08-25 11:56:33] gavin at itmerge dot com

Description:
------------
I wasn't able to use array_slice or array_splice on my associative
arrays so I wrote two functions that others may find useful.

Reproduce code:
---------------
/* Remove a list of Associative keys 
from an array
*/
function array_unset(&$array,$list) {
  foreach($list as $val) {
    unset($array[$val]);
  }
}  

/* Transport a list of Associate keys 
from one array to another
*/
function array_trans(&$arrayfrom,&$arrayto,$list) {
  foreach ($list as $val) {
    $arrayto[$val]=$arrayfrom[$val];
    unset($arrayfrom[$val]);
  }
}



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=25237&edit=1

Reply via email to