我正在处理一个包含多个数组操作的项目。
我的一个变量叫做$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