From: "Alex Hogan" <[EMAIL PROTECTED]>
> I am looking through the manual and I think I may be blind or something,
but
> how can I create an associative array from two arrays.
> What I have is two arrays that look like this;
>
> Array1([0]=>Spider, [1]=>Monkey, [2]=>Cards)
> Array2([0]=>26.3, [1]=>0.65, [2]=>62.07)
>
> I want to combine them into;
>
> ArrayCombined([Spider]=>26.3, [Monkey]=>0.65, [Cards]=>62.07)
>
> So I can compare it to a third array.

foreach($array1 as $key => $value)
{ $arraycombined[$value] = $array2[$key]; }

---John Holmes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to