This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$str = "00 Ethan Buchanan 99"; | |
// The CIPHER... | |
// 1. Look at the ascii value ord() of the first digit (e.g. "a" = 97) | |
// 2. Find the char in the string that corresponds to that number (i.e. the 97th char) | |
// 3. If the string is shorter than that number, wrap around to the first number using MOD() | |
// 4. Move that char to be the first char | |
// 5. Repeat | |
// |