Re: [PHP] problem with function array_* that preserved the key

2001-11-14 Thread Papp Gyozo
no matter what those keys are. hth - Original Message - From: "Stig Venaas" <[EMAIL PROTECTED]> To: "Reuben D Budiardja" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, November 14, 2001 9:49 AM Subject: Re: [PHP] prob

Re: [PHP] problem with function array_* that preserved the key

2001-11-14 Thread Stig Venaas
On Sat, Nov 03, 2001 at 03:54:23PM -0500, Reuben D Budiardja wrote: > since the key are preserved, arrC is no longer indexed from 0. Well, in most > cases I don't care about the key if it's just indexed array. But since the > key I preserved, I can no longer do > > for($i=0; $i echo $arrC[$i]

[PHP] problem with function array_* that preserved the key

2001-11-03 Thread Reuben D Budiardja
Hi, I have problem with array function that return an array and preserved the key of the array argument. Take example of array_diff: I have 2 arrays that has index 0,1,2, ... as the key, and use it as the argument, say $arrA, and $arrB, $arrC = array_diff($arrA, $arrB); since the key are pres