fork(3) download
  1. <?php
  2.  
  3. $original = array("this","is","me","and","I","am","an","array","hello","beautiful","world");
  4. function digits_to_letters($input) {
  5. return strtr($input, "0123456789", "ABCDEFGHIJ");
  6. }
  7.  
  8. $result = array_flip(array_map("digits_to_letters", array_flip($original)));
  9.  
  10. print_r($result);
  11.  
  12. ?>
Success #stdin #stdout 0.02s 13112KB
stdin
Standard input is empty
stdout
Array
(
    [A] => this
    [B] => is
    [C] => me
    [D] => and
    [E] => I
    [F] => am
    [G] => an
    [H] => array
    [I] => hello
    [J] => beautiful
    [BA] => world
)