就像标题所说,我需要做这样的事情...
$i++;//we all know this.
$value = 'a';
increment($value);// i need this functionality
//output
string [ b ]
///here are some more samples, to help you understand...
increment('b'); //output// c
increment('z'); //output// A [capital A not fussy but would be good :) ]
increment('9'); //output// a1
increment('a1'); //output// a2
increment('aa1'); //output// aa2
等等...
更新
假设我使用数字值 $id++,最终可能会得到一个巨大的数字 1310743942525;这比使用“ab34c9”占用更多的空间。我试图保存字符长度以在数据库上节省空间...