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.
これは非常に初歩的な質問だと思いますが、わかりません。
私はコードを持っています:
for($i=1; $i<9; $i++){ if (isset($_POST['is'$i'ID'])) { echo $i . " is OK<br>"; } }
そして、問題は次の行にあることを知っています:
if (isset($_POST['is'$i'ID']))
このコードで変数 i を使用するにはどうすればよいですか?
文字列を連結するだけです。あなたもあなたのエコーコールでそれを行います:)
if (isset($_POST['is' . $i . 'ID']))