src/Utilities/Arrays.php
public static function getLastRow(array $array)
    {
        /*
         * No elements?
         * Nothing to do
         */
        if (empty($array)) {
            return null;
        }

        $effect = [];
        $last = end($array);

        if (is_array($last)) {
            // We've got an array, so looking for the last row of array will be done recursively
            $effect = self::getLastRow($last);

            /*
             * The last row is not an array or it's an empty array?
             * Let's use the previous candidate
             */
            if (!is_array($effect) || (is_array($effect) && empty($effect))) {
                $effect = $last;
            }
        }

        return $effect;
    }
public static function getLastRow(array $array)
    {
        /*
         * No elements?
         * Nothing to do
         */
        if (empty($array)) {
            return null;
        }

        $effect = [];
        $last = end($array);

        if (is_array($last)) {
            // We've got an array, so looking for the last row of array will be done recursively
            $effect = self::getLastRow($last);

            /*
             * The last row is not an array or it's an empty array?
             * Let's use the previous candidate
             */
            if (!is_array($effect) || (is_array($effect) && empty($effect))) {
                $effect = $last;
            }
        }

        return $effect;
    }
public static function getLastRow ( array $ array ) { /*
         * No elements?
         * Nothing to do
         */ if ( empty ( $ array ) ) { return null ; } $ effect = [ ] ; $ last = end ( $ array ) ; if ( is_array ( $ last ) ) { // We've got an array, so looking for the last row of array will be done recursively $ effect = self :: getLastRow ( $ last ) ; /*
             * The last row is not an array or it's an empty array?
             * Let's use the previous candidate
             */ if ( ! is_array ( $ effect ) || ( is_array ( $ effect ) && empty ( $ effect ) ) ) { $ effect = $ last ; } } return $ effect ; }
Returns the last row of array

@param array $array The array to get the last row of
@return mixed
Returns the last row of array