如何将数组的所有值都放在这样:
$array = array('0'=>'apple','1' => 'mango', '2' => 'orange');
到
$fruits = "apple,mango,orange";
请帮助我...... :(感谢之前:D
答案 0 :(得分:1)
尝试使用implode:
<?php
$array = array('0'=>'apple','1' => 'mango', '2' => 'orange');
echo implode(",",$array);
?>