Changing the key of an array?
| From: | c dot just at phoenixdigital dot com | Date: | Wed, 14 Jun 2000 21:50:22 +0000 |
| Subject: | Changing the key of an array? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-1877@lists.php.net to get a copy of this message | ||
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.