src/Kisma/Core/Utility/Scalar.php
public static function array_prepend( $array, $string, $deep = false )
    {
        if ( empty( $array ) || empty( $string ) )
        {
            return $array;
        }

        foreach ( $array as $key => $element )
        {
            if ( is_array( $element ) )
            {
                if ( $deep )
                {
                    $array[$key] = self::array_prepend( $element, $string, $deep );
                }
                else
                {
                    trigger_error( 'array_prepend: array element', E_USER_WARNING );
                }
            }
            else
            {
                $array[$key] = $string . $element;
            }
        }

        return $array;
    }
public static function array_prepend( $array, $string, $deep = false )
    {
        if ( empty( $array ) || empty( $string ) )
        {
            return $array;
        }

        foreach ( $array as $key => $element )
        {
            if ( is_array( $element ) )
            {
                if ( $deep )
                {
                    $array[$key] = self::array_prepend( $element, $string, $deep );
                }
                else
                {
                    trigger_error( 'array_prepend: array element', E_USER_WARNING );
                }
            }
            else
            {
                $array[$key] = $string . $element;
            }
        }

        return $array;
    }
public static function array_prepend ( $ array , $ string , $ deep = false ) { if ( empty ( $ array ) || empty ( $ string ) ) { return $ array ; } foreach ( $ array as $ key => $ element ) { if ( is_array ( $ element ) ) { if ( $ deep ) { $ array [ $ key ] = self :: array_prepend ( $ element , $ string , $ deep ) ; } else { trigger_error ( 'array_prepend: array element' , E_USER_WARNING ) ; } } else { $ array [ $ key ] = $ string . $ element ; } } return $ array ; }
Prepend an array

@param array  $array
@param string $string
@param bool   $deep

@return array
Prepend an array