implode(",", array_keys($arr))
nl2br
$s = nl2br(htmlspecialchard($s));
$html = preg_replace
mb_convert_variables("UTF8", "EUC_JP", $result_arr);
SandBox Help サンプルサイト