0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【初心者】PHPでアルファベットを出力する

Posted at

アルファベットを配列で出力したい

PHPでアルファベットを配列で出力したい時は…

range("A","Z");

このように range関数を使うとアルファベットのAからZまでの配列が作成できる。
出力結果が長くなるので、短めに出力してみる。

$a = range("A","E");
print_r($a);
// 以下出力結果です。
Array
(
    [0] => A
    [1] => B
    [2] => C
    [3] => D
    [4] => E
)

この部分は、アルファベットだけでなく、数字や50音でも出力できる。
range関数。覚えておく!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?