This:
$emails = array("email@hello.com", "email2@hello.com");
$to = implode(",", $emails);
Is the same thing as this:
$to = "email@hello.com,email2@hello.com";
With both of those pieces of code, the $to variable is equal to "email@hello.com,email2@hello.com".