Re: Problem with arrays
| From: | Kevin L'Huillier | Date: | Fri, 24 Jun 2005 16:17:52 +0000 |
| Subject: | Re: Problem with arrays | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-217555@lists.php.net to get a copy of this message | ||
On 24/06/05, Josh Olson <josholson@gmail.com> wrote:
> for ($i = 0; $i < count($array1); i++)
> $array1[$i][] = $array2[$i];
>
> from kevin l'huillier
That's basically what Mike wrote (only with array_push instead of []),
and Bob improved upon. And they didn't mix the arrays up.
I was only making the point that the solution was simple with a quick
comment in IRC. I had not intended for it to be posted to the list.