Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Values2keys
- Converts the values of an array to the keys of it.
- */
- function values2keys($arr, $value=1){
- $new = array();
- while (list($k,$v) = each($arr)){
- $v = trim($v);
- if ($v != ''){
- $new[$v] = $value;
- }
- }
- return $new;
- }
Advertisement
Add Comment
Please, Sign In to add comment