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.
文字列と別の変数を組み合わせた変数を取得する方法を知りたいです。
例:
$var1 ch1 と $ch1var1 以下のような最終変数の名前が欲しい
ありがとうございました。
$var1 = "Hello"; $nbr = "var"; $id = 1; echo ${$nbr.$id};
デモビュー
var 連結を使用する
echo ${$some . $combination . $of . $variables . "or" . "strings"};