Re: [PHP] combining 2 arrays

2007-10-16 Thread James Ausmus
age- > > From: Ladislav Andel [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, October 16, 2007 1:05 PM > > To: James Ausmus; PHP List > > Subject: Re: [PHP] combining 2 arrays > > > > Thank you very much! > > It's exactly the code I was looking f

RE: [PHP] combining 2 arrays

2007-10-16 Thread Daevid Vincent
> -Original Message- > From: Ladislav Andel [mailto:[EMAIL PROTECTED] > Sent: Tuesday, October 16, 2007 1:05 PM > To: James Ausmus; PHP List > Subject: Re: [PHP] combining 2 arrays > > Thank you very much! > It's exactly the code I was looking for! > >

Re: [PHP] combining 2 arrays

2007-10-16 Thread Ladislav Andel
Thank you very much! It's exactly the code I was looking for! Lada PS: my previous ungly code is half long now :) James Ausmus wrote: On 10/16/07, Ladislav Andel <[EMAIL PROTECTED]> wrote: Hi list! I read data from 2 databases and for the purpose of displaying the information at my web inte

Re: [PHP] combining 2 arrays

2007-10-16 Thread Ladislav Andel
nope, merge is not doing what I want and also using FEDERATED engine in mysql I think is not the simplest way to go or even not appropriate. Anyhow, I did it an ugly way ( tablearray follows

Re: [PHP] combining 2 arrays

2007-10-16 Thread James Ausmus
On 10/16/07, Ladislav Andel <[EMAIL PROTECTED]> wrote: > Hi list! > I read data from 2 databases and for the purpose of displaying the > information at my web interface as one piece > I need to combine the data into one array first.. Here is my problem: > > Firstly, it reads from first DB and get t

Re: [PHP] combining 2 arrays

2007-10-16 Thread Philip Thompson
On 10/16/07, Greg Donald <[EMAIL PROTECTED]> wrote: > > On Tue, 16 Oct 2007, Paul Scott wrote: > > You could try something like: > > > > $result[] = $arrayDB1; > > $result[] .= $arrayDB2; > > That .= doesn't do what you think it does when used with arrays. Take this same concept (of creating a ne

Re: [PHP] combining 2 arrays

2007-10-16 Thread Greg Donald
On Tue, 16 Oct 2007, Paul Scott wrote: > You could try something like: > > $result[] = $arrayDB1; > $result[] .= $arrayDB2; That .= doesn't do what you think it does when used with arrays. -- Greg Donald Cyberfusion Consulting http://cyberfusionconsulting.com/ -- PHP General Mailing List (htt

Re: [PHP] combining 2 arrays

2007-10-16 Thread Paul Scott
On Tue, 2007-10-16 at 16:42 +0200, Ladislav Andel wrote: > arrayDB1 = array(array('8', 'SER'), array('5','Asterisk')) > > When finished then it starts reading from second DB > where I would get > > arrayDB2 = array(array('6', 'XIP'), array('4','Asterisk')) > > > Is there any function where I

Re: [PHP] combining 2 arrays

2007-10-16 Thread Ladislav Andel
Ladislav Andel wrote: Miles Thompson wrote: array_merge() function? If your db is MySQL, look at this thread, Google being your friend: http://lists.mysql.com/mysql/204616 Thanks for quick reply. Array_merge doesn't do what I want. And also those databases are at different locations.. Not

Re: [PHP] combining 2 arrays

2007-10-16 Thread Ladislav Andel
Miles Thompson wrote: array_merge() function? If your db is MySQL, look at this thread, Google being your friend: http://lists.mysql.com/mysql/204616 Thanks for quick reply. Array_merge doesn't do what I want. And also those databases are at different locations.. Not the same machines. I f

Re: [PHP] combining 2 arrays

2007-10-16 Thread Miles Thompson
array_merge() function? If your db is MySQL, look at this thread, Google being your friend: http://lists.mysql.com/mysql/204616 Cheers - Milesx On 10/16/07, Ladislav Andel <[EMAIL PROTECTED]> wrote: > > Hi list! > I read data from 2 databases and for the purpose of displaying the > information a

[PHP] combining 2 arrays

2007-10-16 Thread Ladislav Andel
Hi list! I read data from 2 databases and for the purpose of displaying the information at my web interface as one piece I need to combine the data into one array first.. Here is my problem: Firstly, it reads from first DB and get this array: (it's a sum of server names in table) arrayDB1 =