PHP Classes

marray_merge

Recommend this page to a friend!

      Multi-Dimensional Array Handler  >  All threads  >  marray_merge  >  (Un) Subscribe thread alerts  
Subject:marray_merge
Summary:feature request
Messages:3
Author:Chris
Date:2009-06-06 13:22:32
Update:2009-06-06 13:31:27
 

  1. marray_merge   Reply   Report abuse  
Picture of Chris Chris - 2009-06-06 13:22:32
I just found something that would be even more useful than a configurable delimiter: a 'merge' method. It currently takes a good bit of work to merge a normal array with a marray branch.

  2. Re: marray_merge   Reply   Report abuse  
Picture of Chris Chris - 2009-06-06 13:26:39 - In reply to message 1 from Chris
Clarification: It takes work because the values can't be returned by reference. So we must return to the old syntax in order to merge, defeating the class's purpose.

  3. Re: marray_merge   Reply   Report abuse  
Picture of Chris Chris - 2009-06-06 13:31:27 - In reply to message 2 from Chris
Further clarification: I hope which array will overwrite the other will be configurable via an optional argument, or the order of arguments as with 'array_merge'.

I'm not sure whether marrays should be mergeable, but I don't need that; I only need to put the root of one marray on the leaf of another.