Any ideas how to tackle this beast?
Code: Select all
<?php
/* Don't laugh but here is my thinking w/o coffee at 10PM at night. */
$numberArray = array(
0 => array('0'),
1 => array('1'),
2 => array('a','b','c'),
3 => array('d','e','f'),
4 => array('g','h','i'),
5 => array('j','k','l'),
6 => array('m','n','o'),
7 => array('p','q','r','s'),
8 => array('t','u','v'),
9 => array('w','x','y','z')
);
$number = array(1,2,3,5,4,0,5);
//Go through whole number
for($i=0,$k=count($number);$i<$k;$i++)
{
//Pull out letters
for($i=0,$k=count($number[$i]);$i<$k;$i++)
{
/* P.S. - Yes I know I use $i and $k again.... i was only thinking not actually running this code. */
$combo = $numberArray[(int)$number[$i]]
}
}