Hi Xucheng,

On Mon, Feb 27, 2012 at 7:41 PM, xucheng <helloworldje...@gmail.com> wrote:
> Maybe you can trans the array into a xml tree , then modify its leaves .

Now that sounds like an interesting idea... I will have to research
that as an option. Thanks for tip! :)

@Eray,

I was not able to get your code to work on my array... After working
with it a little bit, I realized your idea was very similar to these
others that I have found (great minds think alike):

http://eosrei.net/articles/2011/11/php-arrayinsertafter-arrayinsertbefore
http://drupal.org/node/66183

Your suggestion, and the ones above, work great if I "break out" the
key, pass it directly, then add the key back to the original array.

I have updated my gist and also put the code here:

<http://codepad.org/IY0y9Oy6>

Could things be optimized, or is this an acceptable solution?

Thanks!

Cheers,
Micky

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to