Reply to Re: array_merge bug ?

Your name:

Reply:


Posted by Rik on 08/07/07 17:20

On Tue, 07 Aug 2007 19:12:15 +0200, cornelius <cornelius@nospam.org> wro=
te:

> I've just found the solution :
>
> $Result =3D $Table1 + $Table2 ;
>
> is better than :
>
> $Result =3D array_merge($Table1, $Table2) ;

Depends on wether you want to preserve the key :P

For future reference/people finding this thread: array_merge reindexes =

numerical array's, and on a merge will _overwrite_ string keys but =

_append_ numerical keys.
-- =

Rik Wasmus

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация