$tot = count([total_chked]); $contacts = ""; for($x=0;$x<$tot;$x++) { $contacts .= [total_chked] [$x]; if($x == ($tot-1)){ $contacts .= ". "; } else { $contacts .= ", "; } } echo "