假设我有以下代码: $array = array("john" => "doe", "foe" => "bar", "oh" => "yeah"); foreach($array as $i=>$k) { echo $i.'-'.$k.','; } 回声"john-doe,foe-bar,oh-yeah," 如何去掉最后的逗号?