note 46894 deleted from ref.array by aidan

From: Date: Sun, 09 Oct 2005 09:14:29 +0000
Subject: note 46894 deleted from ref.array by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-96735@lists.php.net to get a copy of this message
Note Submitter: ---- /*! \fn array_renamekeys($values, $table) * \brief Renames the array keys of an array * * $table = array ( "<old_value" => "new_value", ... ) */ function array_renamekeys($values, $table) { if (is_array($values)) { foreach($values as $k => $v) { if (strlen($table["$k"])>0) { unset($values["$k"]); $k=$table["$k"]; } if (is_array($v)) { $values["$k"]=$this->array_renamekeys($v, $table); } else { $values["$k"]=$v; } } } return $values; }

« previous php.notes (#96735) next »