Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ループを使わずに、たとえば文字「c」をアルファベットの数字列に変換する方法(機能)はありますか(3)?
私はリテラル文字列を取得しようとしています -$var = "c"を返す関数をそれに適用します3。
$var = "c"
3
これを行う組み込みの PHP 関数はありますか? 私はオンラインで見つけることができず、必要に応じて関数を書くことを避けたいと思っています。
そのような変換関数を知っている人はいますか?
うん。
$alphabet_position = ord(strtoupper($character)) - ord('A');