From: [EMAIL PROTECTED] Operating system: Linux PHP version: 4.1.1 PHP Bug Type: Feature/Change Request Bug description: New additions to the array family "array_insert"
I believe it would be a very handy feature to have an "array_insert" function (with re-key'ing). I am in need of such an item and thus my request. What I mean by this is if I already have an array with numerical keys, and elements filled in, I would like to be able to insert an element into this pre-existing array. So if I had 10 elements in my array, all with a key index. I have a new element that I want to insert into this array, without popping off the end or from the top...I want it in a specific spot in the array. So I have "newelement" which I want in key5, so I would "array_insert(key(5),newelement)" which would insert it at the appropriate spot without deleting anything there, and "newelement" would now have the key "key5" and the old key5 would now just be key6 and so on, so that I know have 11 elements with numerical keys. Thanks John If that is not clear, please write me and I'll make it more clear. -- Edit bug report at http://bugs.php.net/?id=15562&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=15562&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=15562&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=15562&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=15562&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=15562&r=support Expected behavior: http://bugs.php.net/fix.php?id=15562&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=15562&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=15562&r=submittedtwice