For a better experience please change your browser to CHROME, FIREFOX, OPERA or Internet Explorer.
List your Store
How to get values of an Array inside another array using php

How to get values of an Array inside another array using php

Array is

$store_info= Array ( [phone] => +918886330242 [address] => Array ( [street_1] => Plot no 19, Dr. Sundaraiah Colony, [street_2] => Picket, Secunderabad [city] => Hyderabad [zip] => 500003 [country] => IN [state] => TS ) [location] => [banner] => 8361 [icon] => 0 [gravatar] => 0 [show_more_ptab] => yes [store_ppp] => 10 [enable_tnc] => off [store_tnc] => [show_min_order_discount] => no [store_seo] => Array ( [dokan-seo-meta-title] => Online Grocery Store Hyderabad [dokan-seo-meta-desc] => Online Grocery Store in Hyderabad / Secunderabad is one of the best online grocery store for wholesale and retail [dokan-seo-meta-keywords] => [dokan-seo-og-title] => [dokan-seo-og-desc] => [dokan-seo-og-image] => 0 [dokan-seo-twitter-title] => [dokan-seo-twitter-desc] => [dokan-seo-twitter-image] => 0 ) [find_address] => [dokan_store_time] => Array ( [sunday] => Array ( [open] => close [opening_time] => [closing_time] => ) [monday] => Array ( [open] => close [opening_time] => [closing_time] => ) [tuesday] => Array ( [open] => close [opening_time] => [closing_time] => ) [wednesday] => Array ( [open] => close [opening_time] => [closing_time] => ) [thursday] => Array ( [open] => close [opening_time] => [closing_time] => ) [friday] => Array ( [open] => close [opening_time] => [closing_time] => ) [saturday] => Array ( [open] => close [opening_time] => [closing_time] => ) ) [dokan_store_time_enabled] => no [dokan_store_open_notice] => [dokan_store_close_notice] => [profile_completion] => Array ( [phone] => 10 [banner] => 15 [store_name] => 10 [address] => 10 [Bank] => 15 [next_todo] => Add Profile Picture to gain 15% progress [progress] => 60 [progress_vals] => Array ( [banner_val] => 15 [profile_picture_val] => 15 [store_name_val] => 10 [social_val] => Array ( [fb] => 2 [gplus] => 2 [twitter] => 2 [youtube] => 2 [linkedin] => 2 ) [payment_method_val] => 15 [phone_val] => 10 [address_val] => 10 [map_val] => 15 ) ) [setting_minimum_order_amount] => [setting_order_percentage] => [support_btn_name] => [show_support_btn] => yes )

can use the keys directly as they all are associative arrays:

$city = $store_info['address']['city'];

var_dump($city);

leave your comment


Your email address will not be published. Required fields are marked *

Top