Given an array:
$a = array(
\'abc\',
123,
\'k1\'=>\'v1\',
\'k2\'=>\'v2\',
78,
\'tt\',
\'k3\'=>\'v3\'
);
Wi
You can't use internal array pointer to insert elements.
There's array_splice
which can insert/remove/replace elements and subarrays, but it's intended for integer-indexed arrays.
I'm afraid you'll have to rebuild the array to insert element (except cases where you want to insert first/last element) or use separate integer-indexed array for holding keys in the order you want.