I have a variable that stores a name:
$nome = 'André Ramos';
I have an array that displays all the letters:
$letras = array (
'A' => 1,
'B' => 2,
'C' => 3,
'D' => 4,
'F' => 8,
'G' => 3,
'H' => 5,
'I' => 1,
'J' => 1,
'K' => 2,
'L' => 3,
'M' => 4,
'N' => 5,
'O' => 7,
'P' => 8,
'Q' => 1,
'R' => 2,
'S' => 3,
'T' => 4,
'U' => 6,
'V' => 6,
'X' => 6,
'W' => 6,
'Y' => 1,
'Z' => 7,
'Á' => 5,
'É' => 4,
'Í' => 8,
'Ó' => 6,
'Ú' => 3,
'Ã' => 7,
'Ñ' => 2
);
When typing the name in the variable $nome
, I need the array $letras
to check each character and display its value. You need to display the accented letter value as well.
For example:
$nome: 'André';
array (size=5)
0 => int 1
1 => int 5
2 => int 4
3 => int 2
4 => int 4
Can anyone help me?