Skip to content

Instantly share code, notes, and snippets.

@matgargano
Created October 30, 2018 14:03
Show Gist options
  • Save matgargano/51dc78c41dab13dade4a9a68fa5c94ed to your computer and use it in GitHub Desktop.
Save matgargano/51dc78c41dab13dade4a9a68fa5c94ed to your computer and use it in GitHub Desktop.
p
<?php
function to_num($number) {
$alphabet = range('a','z');
return $alphabet[$number];
}
$array_of_numbers = [1,4,5,6];
$mapped = array_map('to_num', $array_of_numbers);
var_dump($mapped);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment