#25237 [NEW]: Two, associative array functions

From: Date: Mon, 25 Aug 2003 16:56:33 +0000
Subject: #25237 [NEW]: Two, associative array functions
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-46583@lists.php.net to get a copy of this message
From: gavin at itmerge dot com Operating system: Linux PHP version: 4.3.3 PHP Bug Type: Feature/Change Request Bug description: Two, associative array functions 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 bug report at http://bugs.php.net/?id=25237&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25237&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25237&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=25237&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=25237&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=25237&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=25237&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=25237&r=support Expected behavior: http://bugs.php.net/fix.php?id=25237&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=25237&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=25237&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=25237&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25237&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=25237&r=dst IIS Stability: http://bugs.php.net/fix.php?id=25237&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=25237&r=gnused

« previous php.bugs (#46583) next »