How to create a function for converting integers to characters in PHP like this:
'A' => 0,
'B' => 1,
'C' => 2,
'D' => 3,
'E' => 4,
'F' => 5,
'G' => 6,
'H' => 7,
'I' => 8,
'J' => 9
If number is 100, then it should generate BAA.
The A, B, C... are just an example. I am trying to encrypt the numbers with a code.
I need this to work with some word like
0 => zero
1 => one
etc
But when I give number 10, it should output onezero
.
Simple try like this
$letter = chr($i+65);
echo $letter;
gives 'A'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With