Re: Changing the key of an array?
| From: | Zak Greant | Date: | Wed, 14 Jun 2000 21:54:47 +0000 |
| Subject: | Re: Changing the key of an array? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-1878@lists.php.net to get a copy of this message | ||
At 07:50 AM 6/15/00 +1000, c.just@phoenixdigital.com wrote:
Hi, I am trying to do the following. I have an array $this = array("a"=>"orange", "b"=>"banana", "c"=>"apple"); how can I remove the entry $this["b"] and or rename it to $this["d"]Hi C. You could do this: $this['d'] = $this['b']; unset ($this['b']); Ciao, Zak Zak Greant Creative Director Nucleus Information Service Inc. "I am rather like a mosquito in a nudist camp: I know what I ought to do, but I don't know where to begin." - Stephen Bayne