Re: Changing the key of an array?

From: Date: Wed, 14 Jun 2000 21:57:10 +0000
Subject: Re: Changing the key of an array?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-1879@lists.php.net to get a copy of this message
would something like $this[d] = $this[b]; unset ($this[b]); work? I'm working from the example so it may not address the problem you have... hth Ryan On Thu, Jun 15, 2000 at 07:50:22AM +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"] > > I can see that it would use array_splice() but I'm not to sure ow it works when it comes > to associative arrays. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net ---end quoted text---

« previous php.general (#1879) next »