0

这段代码

global $wpdb;
$bankaccountinfo = get_option( 'va_options' );
$arr = array($bankaccountinfo);

print_r(array_values($arr));

为我提供下面的数组

    Array
(
    [0] => Array
        (
            [geocoder] => google
            [geocoder_settings] => Array
                (
                    [google] => Array
                        (
                            [geo_region] => us
                            [geo_language] => en
                            [geo_unit] => mi
                            [api_key] => 
                        )

                )

            [map_provider] => google
            [map_provider_settings] => Array
                (
                    [google] => Array
                        (
                            [geo_region] => us
                            [geo_language] => en
                            [geo_unit] => mi
                            [api_key] => 
                        )

                )

            [geo_unit] => mi
            [currency_code] => EUR
            [currency_identifier] => symbol
            [currency_position] => left
            [thousands_separator] => .
            [decimal_separator] => ,
            [tax_charge] => 21
            [color] => blue
            [admin_security] => manage_options
            [wp_login] => 
            [listing_price] => 0
            [listing_charge] => no
            [listing_duration] => 30
            [moderate_listings] => no
            [moderate_claimed_listings] => yes
            [included_categories] => 0
            [listings_per_page] => 10
            [default_listing_sort] => default
            [default_listing_home_sort] => default
            [listings_featured_sort] => random
            [editor_listing] => default
            [default_geo_search_sort] => distance
            [default_search_sort] => rating
            [default_radius] => 
            [addons] => Array
                (
                    [featured-home] => Array
                        (
                            [enabled] => 1
                            [price] => 9.99
                            [duration] => 30
                            [period] => 30
                            [period_type] => D
                        )

                    [featured-cat] => Array
                        (
                            [enabled] => 1
                            [price] => 4.99
                            [duration] => 30
                            [period] => 30
                            [period_type] => D
                        )

                )

            [category_surcharges] => Array
                (
                    [software] => Array
                        (
                            [surcharge] => 0
                        )

                )

            [categories_menu] => Array
                (
                    [count] => 
                    [depth] => 3
                    [sub_num] => 3
                    [hide_empty] => 
                )

            [categories_dir] => Array
                (
                    [count] => 
                    [depth] => 3
                    [sub_num] => 3
                    [hide_empty] => 
                )

            [events_enabled] => 
            [default_event_geo_search_sort] => distance
            [default_event_search_sort] => event_date
            [default_event_radius] => 
            [event_charge] => no
            [event_price] => 0
            [event_featured-home_enabled] => 1
            [event_featured-home_price] => 0
            [event_featured-cat_enabled] => 1
            [event_featured-cat_price] => 0
            [event_included_categories] => 0
            [event_expiration] => 30
            [moderate_events] => no
            [events_per_page] => 10
            [default_event_sort] => default
            [default_event_home_sort] => default
            [events_featured_sort] => random
            [editor_event] => default
            [listing_permalink] => fotografen
            [edit_listing_permalink] => wijzigen
            [renew_listing_permalink] => vernieuwen
            [claim_listing_permalink] => claimen
            [purchase_listing_permalink] => kopen
            [listing_cat_permalink] => specialisme
            [listing_tag_permalink] => zoekwoord
            [event_permalink] => evenementen
            [edit_event_permalink] => edit
            [purchase_event_permalink] => purchase
            [event_cat_permalink] => categorie
            [event_tag_permalink] => zoekwoord
            [event_day_permalink] => dag
            [dashboard_events_permalink] => evenementen
            [dashboard_event_comments_permalink] => reacties
            [dashboard_event_favorites_permalink] => evenementen-favorieten
            [dashboard_events_attending_permalink] => deelnemen
            [dashboard_permalink] => dashboard
            [dashboard_listings_permalink] => vermeldingen
            [dashboard_claimed_permalink] => geclaimd
            [dashboard_reviews_permalink] => beoordelingen
            [dashboard_faves_permalink] => favorieten
            [gateways] => Array
                (
                    [enabled] => Array
                        (
                            [bank-transfer] => 1
                            [paypal] => 1
                            [pronamic_ideal] => 1
                        )

                    [bank-transfer] => Array
                        (
                            [message] => Bankinfo
                        )

                    [pronamic_ideal] => Array
                        (
                            [config_id] => 440
                        )

                    [paypal] => Array
                        (
                            [email_address] => *protected email*
                            [business_account] => 
                            [sandbox_enabled] => 
                            [pdt_enabled] => 
                            [pdt_key] => G9YvVFpThi0bNAu6wYQe4unz_ReqUttrcHWXHDvPA0pbdCQ3ky63CWFvGfu
                            [ipn_enabled] => 
                        )

                )

            [listing_sharethis] => 0
            [event_sharethis] => 0
            [blog_post_sharethis] => 0
            [page_template_updates_1_2] => 1
            [default_user_role_update_1_3_2] => 1
        )

)

现在我想获取并返回'[bank-transfer] => Array([message]' 这是'Bankinfo'的值。我不知道如何使用多个(子)数组来做到这一点。尝试了下面的代码这没有做任何事情。

echo $arr['bank-transfer']['message'];

有人可以帮我吗?

4

0 回答 0