Welcome Guest, Not a member yet? Register   Sign In
array_merge() is messing with my array keys.
#5

[eluser]TheFuzzy0ne[/eluser]
OK, problem solved!

array_merge() was overkill. I just needed to add the entry to the array in the normal fashion:

Code:
$arr['other'] = 'Other';

Why it never occurred to me, I have no idea, but if I had two large arrays to merge, the problem would still be there, as array_splice() seems to suffer from the same problem.


Messages In This Thread
array_merge() is messing with my array keys. - by El Forum - 10-02-2008, 06:24 AM
array_merge() is messing with my array keys. - by El Forum - 10-02-2008, 06:38 AM
array_merge() is messing with my array keys. - by El Forum - 10-02-2008, 06:49 AM
array_merge() is messing with my array keys. - by El Forum - 10-02-2008, 07:03 AM
array_merge() is messing with my array keys. - by El Forum - 10-02-2008, 07:08 AM
array_merge() is messing with my array keys. - by El Forum - 10-02-2008, 07:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB