source/php/Search.php
public function appendToArray(array $array, $key, array $new)
    {
        $keys = array_keys($array);
        $index = array_search($key, $keys);
        $pos = false === $index ? count($array) : $index + 1;

        return array_merge(array_slice($array, 0, $pos), $new, array_slice($array, $pos));
    }
public function appendToArray(array $array, $key, array $new)
    {
        $keys = array_keys($array);
        $index = array_search($key, $keys);
        $pos = false === $index ? count($array) : $index + 1;

        return array_merge(array_slice($array, 0, $pos), $new, array_slice($array, $pos));
    }
public function appendToArray ( array $ array , $ key , array $ new ) { $ keys = array_keys ( $ array ) ; $ index = array_search ( $ key , $ keys ) ; $ pos = false === $ index ? count ( $ array ) : $ index + 1 ; return array_merge ( array_slice ( $ array , 0 , $ pos ) , $ new , array_slice ( $ array , $ pos ) ) ; }
Appends items to array after specific key
@param  array  $array The array to append to
@param  string $key   The key to append after
@param  array  $new   The items to append
@return array         The new array
Appends items to array after specific key