PHP Code By tony
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | <?php /** 交换数组中的键和值 */ $userNames = array('tony'=>26,'xiaosi'=>26,'jacky'=>25); print_r($userNames); echo '<br>'; $newUserNames = array_flip($userNames); print_r($newUserNames); ?> |