Access dynamic object property php

Posted: April 2, 2014 in web

Json

{“Monday”:[“9:00 am”,”6:00pm”],”Tuesday”:[“9:00 am”,”6:00pm”],”Wednesday”:[],”Thursday”:[“9:00 am”,”6:00pm”],”Friday”:[“9:00 am”,”6:00pm”],”Saturday”:[“9:00 am”,”6:00pm”],”Sunday”:[“9:00 am”,”6:00pm”]}

$stmp = json_decode($globalComplex->field('complex_hours'));
                        var_dump($stmp->{"Monday"});
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s