Re: [PHP] resetting arrays

2005-06-21 Thread I. Gray
Thanks Richard, I had thought of sort. It almost does what I want, and really simply and neat. However it sorts the array alphabetically, and I would prefer to have things in the same order. Is there another way? Ian Gray Richard Davey wrote: Hello, Tuesday, June 21, 2005, 1:33:55 PM, you

RE: [PHP] resetting arrays

2005-06-21 Thread Kim Madsen
> -Original Message- > From: I. Gray [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 21, 2005 2:34 PM > To: php-general@lists.php.net > Subject: [PHP] resetting arrays > > Hi. > > I am sure this is easy, but I can't get this work. Is there not a php &

Re: [PHP] resetting arrays

2005-06-21 Thread david forums
Hi I'm not sure but maybe array_flip or array_reverse should help try with different array_FONCTION, at the ultimate you can use array_map to reindex the array. regards david Le Tue, 21 Jun 2005 14:33:55 +0200, I. Gray <[EMAIL PROTECTED]> a écrit: Hi. I am sure this is easy, bu

Re: [PHP] resetting arrays

2005-06-21 Thread Richard Davey
Hello, Tuesday, June 21, 2005, 1:33:55 PM, you wrote: IG> I have an array- for example... IG> What happens, say if I delete [3] => Purple? I get... IG> But what if I want to reset the numbers? Like... 'a', 1 => 'b', 2 => 'c', 3 => 'd', 4 => 'e'); print_r($array); unset

[PHP] resetting arrays

2005-06-21 Thread I. Gray
Hi. I am sure this is easy, but I can't get this work. Is there not a php function that can do this? I have an array- for example... [1] => Yellow [2] => Green [3] => Purple [4] => Blue [5] => Red [6] => Orange [7] => Cyan What happens, say if I delete [3] => Purple? I get... [1] => Yellow