这是我正在处理的多维数组的示例格式:
Array (
[1] => Array ( [code] => PPJ3 [street] => 34412 Fake Street [city] => Detroit [state] => MI [zip] => 48223 [county] => Wayne [cost] => 432.00 )
[2] => Array ( [code] => PLK3 [street] => 73517 Fake Street [city] => Detroit [state] => MI [zip] => 48223 [county] => Wayne [cost] => 54.00 )
[3] => Array ( [code] => HYK2 [street] => 55224 Fake Street [city] => Detroit [state] => MI [zip] => 48208 [county] => Wayne [cost] => 345.00 )
)
我正在尝试将隐藏字段设置为仅代码值并用逗号分隔。数组也需要循环,因为它总是会改变。这就是我希望它看起来的样子:
$myHiddenField = PPJ3、PLK3、HYK2
对此进行编码的简单方法是什么?