1
0

More than 1 year has passed since last update.

Uninitialized string offsetとは(PHPのエラー)

Posted at

Uninitialized string offsetとは、文字列型の変数に対して、存在しないキー名を呼び出したときに発生するエラー。
(例)

$a = 'PHPを勉強中です。';
echo $a[100];

この場合、Uninitialized string offset: 100 というエラーが出る。

参考文献

PHP | Uninitialized string offset エラーの原因と修正案
https://1-notes.com/php-error-uninitialized-string-offset/

1
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
1
0