public static function pluck(array $array, $directions, $safe = false)
    {
        if ((is_string($directions)
                || is_int($directions))
            && isset($array[$directions])) {
            // If $directions is a key, just return the value for that key.
            return $array[$directions];
        } elseif (is_array($directions)) {
            // If $directions isn't a key, then we have more work to do.
            if (count($directions) === 1) {
                // If $directions has only one value, call array_pluck()
                // with that one value as the key.
                return static::pluck($array, $directions[0], $safe);
            } elseif (isset($array[$directions[0]])) {
                // If $directions is still a multi-value array, then we
                // have more work to do. Get rid of the direction we're
                // on, and start recursing.
                $key = array_shift($directions);
                return static::pluck($array[$key], $directions, $safe);
            }
        }

        if ($safe === true) {
            return null;
        } else {
            return new ZenodorusError([
                'code'        => "pluck::not-found",
                'description' => "Arrays::pluck() could not find the value 
                    you're looking for.",
                'data'        => ['array' => $array, 'directions' => $directions],
            ]);
        }
    }
public static function pluck(array $array, $directions, $safe = false)
    {
        if ((is_string($directions)
                || is_int($directions))
            && isset($array[$directions])) {
            // If $directions is a key, just return the value for that key.
            return $array[$directions];
        } elseif (is_array($directions)) {
            // If $directions isn't a key, then we have more work to do.
            if (count($directions) === 1) {
                // If $directions has only one value, call array_pluck()
                // with that one value as the key.
                return static::pluck($array, $directions[0], $safe);
            } elseif (isset($array[$directions[0]])) {
                // If $directions is still a multi-value array, then we
                // have more work to do. Get rid of the direction we're
                // on, and start recursing.
                $key = array_shift($directions);
                return static::pluck($array[$key], $directions, $safe);
            }
        }

        if ($safe === true) {
            return null;
        } else {
            return new ZenodorusError([
                'code'        => "pluck::not-found",
                'description' => "Arrays::pluck() could not find the value 
                    you're looking for.",
                'data'        => ['array' => $array, 'directions' => $directions],
            ]);
        }
    }
public static function pluck ( array $ array , $ directions , $ safe = false ) { if ( ( is_string ( $ directions ) || is_int ( $ directions ) ) && isset ( $ array [ $ directions ] ) ) { // If $directions is a key, just return the value for that key. return $ array [ $ directions ] ; } elseif ( is_array ( $ directions ) ) { // If $directions isn't a key, then we have more work to do. if ( count ( $ directions ) === 1 ) { // If $directions has only one value, call array_pluck() // with that one value as the key. return static :: pluck ( $ array , $ directions [ 0 ] , $ safe ) ; } elseif ( isset ( $ array [ $ directions [ 0 ] ] ) ) { // If $directions is still a multi-value array, then we // have more work to do. Get rid of the direction we're // on, and start recursing. $ key = array_shift ( $ directions ) ; return static :: pluck ( $ array [ $ key ] , $ directions , $ safe ) ; } } if ( $ safe === true ) { return null ; } else { return new ZenodorusError ( [ 'code' => "pluck::not-found" , 'description' => "Arrays::pluck() could not find the value 
                    you're looking for." , 'data' => [ 'array' => $ array , 'directions' => $ directions ] , ] ) ; } }
Recursive function to get things from deep in multi-dimensional
arrays.

$directions should initially be an array (otherwise we wouldn't)
need this function. Each item in the array should be the key of
an element that is the child of the value returned by the preceeding
element.

So with the following array:
```
$array = [
'top' => [
'middle1' => 'hello',
'middle2' => [
'final' => 'this is it!'
]
]
];
```

Calling `Arrays::pluck($array, ['top', 'middle2', 'final'])` would
return `this is it!`, while calling `Arrays::pluck($array, ['top', 'middle1'])`
would return `hello`.

Setting $safe to `true` can cause unexpected behavior: Since it returns
`null` when it fails, it could theoretically return lead a user to
believe they had successfully retrieved an array item that had the
explicity value of `null`. It is therefore recommended to keep $safe off.

@param array            $array         The array to pluck from.
@param array|string|int $directions    Directions to the element we want.
@param boolean          $safe          Whether or not to throw an error.
@return mixed                          Returns whatever the value is (can
be anything).
Recursive function to get things from deep in multi - dimensional arrays .