Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9137695
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:09:32+00:00 2026-06-17T09:09:32+00:00

I would like to know how to return a value of an object with

  • 0

I would like to know how to return a value of an object with a name value pair that’s inside an array. I’ve been trying all sorts of methods and frankly I realized I may be way over my head on this. I’d like some assistance trying to get the AirportsInformation_DataExtension value inside the property array.

stdClass Object
(
    [OverallStatus] => OK
    [RequestID] => 19e41b46-df68-47ba-8858-d728f3a92036
    [Results] => stdClass Object
        (
            [PartnerKey] => 
            [ObjectID] => 
            [Type] => DataExtensionObject
            [Properties] => stdClass Object
                (
                    [Property] => Array
                        (
                            [0] => stdClass Object
                                (
                                    [Name] => CampaignName
                                    [Value] => 20130107_FlightDealsHotelPricePoints
                                )

                            [1] => stdClass Object
                                (
                                    [Name] => StartDate
                                    [Value] => 1/7/2013 12:00:00 AM
                                )

                            [2] => stdClass Object
                                (
                                    [Name] => EndDate
                                    [Value] => 1/15/2013 5:59:59 AM
                                )

                            [3] => stdClass Object
                                (
                                    [Name] => CampaignType
                                    [Value] => FlightDeals
                                )

                            [4] => stdClass Object
                                (
                                    [Name] => LandingPage_ExpireDate
                                    [Value] => 1/15/2013 5:59:59 AM
                                )

                            [5] => stdClass Object
                                (
                                    [Name] => LandingPage_AutoRedirectOnExpire
                                    [Value] => True
                                )

                            [6] => stdClass Object
                                (
                                    [Name] => LandingPage_ExpireTargetURL
                                    [Value] => test
                                )

                            [7] => stdClass Object
                                (
                                    [Name] => BookByDate
                                    [Value] => 1/22/2013 12:00:00 AM
                                )

                            [8] => stdClass Object
                                (
                                    [Name] => TravelStartDate
                                    [Value] => 
                                )

                            [9] => stdClass Object
                                (
                                    [Name] => TravelEndDate
                                    [Value] => 
                                )

                            [10] => stdClass Object
                                (
                                    [Name] => FlightDeals_DataExtension
                                    [Value] => 20130107_DestinationFlightDeals
                                )

                            [11] => stdClass Object
                                (
                                    [Name] => FlightDeals_SortOrder_DataExtension
                                    [Value] => FlightDeals_DestinationSortOrder
                                )

                            [12] => stdClass Object
                                (
                                    [Name] => HotelDeals_DataExtension
                                    [Value] => 20130107_FlightDealsHotelPricePoints
                                )

                            [13] => stdClass Object
                                (
                                    [Name] => HotelDeals_All_DataExtension
                                    [Value] => 20130107_HotelPackageDeals_ALL
                                )

                            [14] => stdClass Object
                                (
                                    [Name] => HotelInformation_DataExtension
                                    [Value] => EmailHotelInformation
                                )

                            [15] => stdClass Object
                                (
                                    [Name] => AirportsInformation_DataExtension
                                    [Value] => Airports
                                )

                            [16] => stdClass Object
                                (
                                    [Name] => RoutesInformation_DataExtension
                                    [Value] => Routes
                                )

                            [17] => stdClass Object
                                (
                                    [Name] => DFP_DataExtension
                                    [Value] => ET_DestinationIframeSrc
                                )

                            [18] => stdClass Object
                                (
                                    [Name] => DeepLinkConnectorURL
                                    [Value] => http://www.somewebsite/BookingConnector.html?mode=run
                                )

                            [19] => stdClass Object
                                (
                                    [Name] => DefaultDestinationScenery
                                    [Value] => LAS
                                )

                            [20] => stdClass Object
                                (
                                    [Name] => DefaultHomeAirportCode
                                    [Value] => 
                                )

                            [21] => stdClass Object
                                (
                                    [Name] => FailSafeHomeAiportCode
                                    [Value] => 
                                )

                            [22] => stdClass Object
                                (
                                    [Name] => DFP_Campaign_Banner
                                    [Value] => True
                                )

                            [23] => stdClass Object
                                (
                                    [Name] => EmailID
                                    [Value] => 44388
                                )

                        )

                )

        )

)

Using a foreach loop I was able to print out all lines with name/value sets

foreach ($results->Results->Properties->Property as $CurrentProp){
    print('<br>');
    print('Name: '.$CurrentProp->Name. ' Value: '.$CurrentProp->Value.'<br>');                    
};

Sadly I can’t get passed that. I just need to retrieve the value. Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T09:09:33+00:00Added an answer on June 17, 2026 at 9:09 am

    If you would need to be able to get all the values based on their name, it could be useful to turn it in to an associative array, like this

    $results->Results->Properties->PropertyArray = array();
    foreach($results->Results->Properties->Property as $arrCurrentProperty) {
      $results->Results->Properties->PropertyArray[$arrCurrentProperty->Name] = $arrCurrentProperty->Value;
    };
    

    Then you can get the values later by indexing them directly, i.e.

    echo 'The value is: ' . $results->Results->Properties->PropertyArray['AirportsInformation_DataExtension'];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to know how to convert parent object that was return by
I would like to know how to get the name of the property that
I would like to know if there is any way to return an char
I would like to know if it's possible to support '\r' (carriage return) without
I would like to know what code to use to convert a double[] array
I know premature optimization is the mother of all evil. However, I would like
i would like know some reference. I know i can googling it. but prefer
Would like to know what a programmer should know to become a good at
Would like to know the c# code to actually retrieve the IP type: Static
Would like to know how to integarate cruise control with maven? Cruise Control comes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.