Right now I am developing a cryptography app and I have a problem with this one
$stralphabet=array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z');
As you can see the string above is a string of alphabet. I am making a caesar shift encryption, the algorithm is simple.
Count the number of string and then substitute each letter based from the position, so for example:
string is "AB" after encryption it would be "CD"
The problem is if I have the string YZ" it gives me an error
Notice: Undefined offset: 26 in C:\xampp\htdocs\cryptographer\encrypt.php on line 19
Notice: Undefined offset: 27 in C:\xampp\htdocs\cryptographer\encrypt.php on line 19
Can you help me with this one?