【发布时间】:2017-05-04 08:20:02
【问题描述】:
我正在处理一个具有多个数组操作的项目。
我有一个名为 $product_attributes 的变量,它包含以下数组作为值。
Array
(
[0] => Array
(
[0] => Applications
[1] => Steel; PVC; Std. Wall
)
[1] => Array
(
[0] => Blade Exp.
[1] => 0.29
)
[2] => Array
(
[0] => Fits Model
[1] => 153
)
)
现在我想把它转换成 | (管道)分隔字符串如下:
Applications=Steel; PVC; Std. Wall|Blade Exp.=0.29|Fits Model=153
以下是我尝试过的:
$tags = implode('|',$product_attributes);
echo "Output".$tags;
但它返回的输出如下:
OutputArray|Array|Array|Array|Array|Array
【问题讨论】: