note 68041 deleted from function.array-flip by bjori

From: Date: Tue, 10 Oct 2006 12:21:25 +0000
Subject: note 68041 deleted from function.array-flip by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-118341@lists.php.net to get a copy of this message
Note Submitter: egingell at sisna dot com ---- Possible structure of this function: Note: __CALLED_BY_FILE__ and __CALLED_ON_LINE__ are not real constants. <? function array_flip($array) { $return_array = array(); foreach ($array AS $key => $value) { if (is_string($value) || is_int($value)) { $return_array[$value] = $key; } else { echo '<p><b>Warning:</b> array_flip(): Can only flip STRING and INTEGER values! in <b>'. __CALLED_BY_FILE__ .'</b> on line <b>'. __CALLED_ON_LINE__ .'</b></p>'; } } return $return_array; } ?>

« previous php.notes (#118341) next »