$str = implode("", file("keys.txt")); $str=str_replace("\n",', ',$str); $str2=substr($str,0,200); print $str2;