an" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, December 10, 2004 2:45 PM
Subject: Re: [PHP] array_merge_recursive
> foreach ($animal_counts as $animal => $total) {
> echo $animal. ':' .$total. '';
> }
>
>
> On Fri, 10 Dec 2
foreach ($animal_counts as $animal => $total) {
echo $animal. ':' .$total. '';
}
On Fri, 10 Dec 2004 13:51:36 -0500, Sebastian
<[EMAIL PROTECTED]> wrote:
> actually, what i mean is i need to get the animal name as well..
>
> ie:
> echo $animal . ' : ' . $total
> would output:
>
> :
> :
actually, what i mean is i need to get the animal name as well..
ie:
echo $animal . ' : ' . $total
would output:
:
:
etc. thanks.
- Original Message -
From: "Sebastian" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 10, 2004 12:24 PM
Subject: [PHP] array_merge_
Sebastian wrote:
> Hi.
>
> I am using this array_merge_recursive to merge two arrays, the array looks
> like this:
>
> Array
> (
> [0] => Array
> (
> [animal] => Dogs
> [total] => 5
>
> )
>
> [1] => Array
> (
> [animal] => Cats
les before
using the function.. or rolling your own merger function. :-\
-Kevin
- Original Message -
From: "Michiel van Wessem" <[EMAIL PROTECTED]>
To: "Kevin Stone" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, September 20, 2002 10:52 AM
Su
Hello Kevin,
Yes, and that's the good part. The bad part is that $a is affected (try
print_r($a)). I don't think it should be.
Michiel
At 12:41 PM 9/20/2002, Kevin Stone wrote:
>Worked fine for me..
>";print_r($r);echo "";?>---Array
>(
> [k] => Array
> (
> [0]
Worked fine for me..
";print_r($r);echo "";?>---Array
(
[k] => Array
(
[0] => a1
[1] => b1
)
)
---Access the merged array with with $r['k']; with values at
$r['k'][0] and $r['k'][1]. Is this not what you wanted?
-Kevin
- Original M
7 matches
Mail list logo