How to increment letters like numbers in PHP?

后端 未结 8 1367
孤城傲影
孤城傲影 2020-11-27 16:41

I would like to write a function that takes in 3 characters and increments it and returns the newly incremented characters as a string.

I know how to increase a sing

8条回答
  •  温柔的废话
    2020-11-27 16:58

    Character/string increment works in PHP (though decrement doesn't)

    $x = 'AAZ';
    $x++;
    echo $x;
    

提交回复
热议问题