src/Utilities/Arrays.php
public static function getNonEmptyValuesAsString(array $values, $separator = ', ')
    {
        /*
         * No elements?
         * Nothing to do
         */
        if (empty($values)) {
            return null;
        }

        $nonEmpty = self::getNonEmptyValues($values);

        /*
         * No values?
         * Nothing to do
         */
        if (empty($nonEmpty)) {
            return '';
        }

        return implode($separator, $nonEmpty);
    }
public static function getNonEmptyValuesAsString(array $values, $separator = ', ')
    {
        /*
         * No elements?
         * Nothing to do
         */
        if (empty($values)) {
            return null;
        }

        $nonEmpty = self::getNonEmptyValues($values);

        /*
         * No values?
         * Nothing to do
         */
        if (empty($nonEmpty)) {
            return '';
        }

        return implode($separator, $nonEmpty);
    }
public static function getNonEmptyValuesAsString ( array $ values , $ separator = ', ' ) { /*
         * No elements?
         * Nothing to do
         */ if ( empty ( $ values ) ) { return null ; } $ nonEmpty = self :: getNonEmptyValues ( $ values ) ; /*
         * No values?
         * Nothing to do
         */ if ( empty ( $ nonEmpty ) ) { return '' ; } return implode ( $ separator , $ nonEmpty ) ; }
Returns non-empty values concatenated by given separator

@param array  $values    The values to filter
@param string $separator (optional) Separator used to implode the values. Default: ", ".
@return null|string
Returns non - empty values concatenated by given separator