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

  • Home
  • SEARCH
  • 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 793291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:07:40+00:00 2026-05-14T22:07:40+00:00

Refers to my previous question : Show values in TDropDownList in PRADO. ok fine

  • 0

Refers to my previous question : Show values in TDropDownList in PRADO.
ok fine the array i receive from query is an object array like :

ContactRecord Object ( [id] => 1 [name] => leo [_recordState:protected] => 1 [_connection:protected] => [_invalidFinderResult:protected] => [_e:TComponent:private] => Array ( ) )
ContactRecord Object ( [id] => 2 [name] => ganda [_recordState:protected] => 1 [_connection:protected] => [_invalidFinderResult:protected] => [_e:TComponent:private] => Array ( ) ) 

If I convert it in to array like:

Array ( [key 1] => leo [key 2] => ganda )

then I can populate values into TDropDownList.

Now can anyone help me to convert array structure which I need … ?

Again thanks

  • 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-05-14T22:07:41+00:00Added an answer on May 14, 2026 at 10:07 pm

    If you don’t care about the keys:

    array_map(function (ContactRecord $o) { return $o->name; }, $origArray)
    

    Otherwise:

    $res = array();
    foreach ($origArray as $obj) {
        $res[$o->id] = $o->name;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like help with mysql query that refers to the cell above. for
Please refer my previous question for code sample Sockets: sometimes (rarely) packets are lost
Please refer to my previous question here: Link Here Will this project type be
This is a variation on a previous question as I am having tons of
Refer to this post for discussions on previous versions. Asking the question again since
I have some question about functions which have default parameters. import sys from random
I have a problem, i like to refer to other commits from within commit
I refer to my previous question on JQuery Rotating List. You can view the
In response to a previous question , @Pablo Fernandez suggested I implement a simple
I have deleted my previous question and post this updated: I have a an

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.