Last active
February 15, 2024 10:26
-
-
Save vielhuber/04dc25278b082cb0c81e to your computer and use it in GitHub Desktop.
get next letter in alphabet #php
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 | |
$letter = 'A'; | |
echo ++$letter; // outputs 'B' | |
echo chr(ord($letter) + 3); // outputs 'E' | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment