public static function arrayToList(array $array = array())
    {
        $return = array();
        foreach ($array as $name => $email) {
            $return[] = empty($name) || General::intval($name) > -1
                        ? $email
                        : $name . ' <' . $email . '>';
        }

        return implode(', ', $return);
    }
public static function arrayToList(array $array = array())
    {
        $return = array();
        foreach ($array as $name => $email) {
            $return[] = empty($name) || General::intval($name) > -1
                        ? $email
                        : $name . ' <' . $email . '>';
        }

        return implode(', ', $return);
    }
public static function arrayToList ( array $ array = array ( ) ) { $ return = array ( ) ; foreach ( $ array as $ name => $ email ) { $ return [ ] = empty ( $ name ) || General :: intval ( $ name ) > - 1 ? $ email : $ name . ' <' . $ email . '>' ; } return implode ( ', ' , $ return ) ; }
Implodes an associative array or straight array to a
comma-separated string

@param array $array
@return string
Implodes an associative array or straight array to a comma - separated string