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.
实际上我不明白我将如何解释我的问题。我试图举一个例子。在我的 php 代码中,我得到了一个这样的数组:
Array ( [0] => E-mail [1] => Newsletter )
我想从该数组中检索所有值并希望将其存储在$result. 我尝试了foreach功能。但是我不能将所有结果存储$result为 as 因为它每次都在更改并打印单独的值。任何人都可以帮助我。提前致谢。
$result
foreach
foreach ($array as $k => $v) { $result .= $v; } echo $result;