For anybody who is wondering... jrhardytwothousandtwo's
trick for inserting an element using array_splice, will also
work with multi-dimensional arrays if you do the following:
<?php
function array_insert(&$input, $offset, $replacement){
array_splice($input, $offset, 0, 0);
$input[$offset] = $replacement;
}
?>
I'm not sure if this (or a derivative of it) will solve
other problems that I have seen just about everybody on here
trying to solve. But apart from it's hackish nature, it
works well for me.
----
Server IP: 203.16.234.20
Probable Submitter: 202.89.183.43
----
Manual Page -- http://www.php.net/manual/en/function.array-splice.php
Edit -- http://master.php.net/manage/user-notes.php?action=
edit+61710
Delete: added to the manual -- htt
p://master.php.net/manage/user-notes.php?action=delete+61710
&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.
php.net/manage/user-notes.php?action=delete+61710&report
=yes&reason=bad+code
Delete: spam -- http://master.php.
net/manage/user-notes.php?action=delete+61710&report=yes
&reason=spam
Delete: useless -- http://master.p
hp.net/manage/user-notes.php?action=delete+61710&report=
yes&reason=useless
Delete: non-english -- http://mast
er.php.net/manage/user-notes.php?action=delete+61710&rep
ort=yes&reason=non-english
Delete: already in docs -- http://
master.php.net/manage/user-notes.php?action=delete+61710&
;report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-
notes.php?action=delete+61710&report=yes
Reject -- http://master.php.net/manage/user-
notes.php?action=reject+61710&report=yes
Search -- http://ma
ster.php.net/manage/user-notes.php
--
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|