使用同一数组中的关联数组值

dru*_*mer 1 php arrays associative-array

我正在尝试从同一个数组中访问关联数组的键和值.如果我的阵列中有3对.我可以用假设的值的值somethingother第三个内another

$gar = array("something" => "something value", 
             "other" => "other value", 
             "another" => something . other 
       );
Run Code Online (Sandbox Code Playgroud)

这个想法是另一个人的价值将是"有价值的东西".

这可能吗?有没有办法完成同样的事情?

Mar*_*arz 6

这件事怎么样?

$gar = array("something" => "something value", 
         "other" => "other value"
   );

$gar["another"] = $gar["something"] . $gar["other"];
Run Code Online (Sandbox Code Playgroud)