我有一个数组,如何将其覆盖到最快的字符串?
Array
(
[1] => 1,
[2] => 8,
[3] => 10,
[4] => 16,
)
我需要把它覆盖到这个字符串$ var =(1,8,10,16)
答案 0 :(得分:0)
答案 1 :(得分:0)
你可以使用简单的内爆函数。
$arr = array(
"1" => 1,
"2" => 8,
"3" => 10,
"4" => 16
);
echo implode($arr, ",");
输出:1,8,10,16
OR
foreach ($arr as $value) {
echo $value .", ";
}
输出:1,8,10,16,