Change array structure in PHP.
Posted
by Muhammad Sajid
on Stack Overflow
See other posts from Stack Overflow
or by Muhammad Sajid
Published on 2010-05-19T11:54:48Z
Indexed on
2010/05/19
12:00 UTC
Read the original article
Hit count: 224
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
© Stack Overflow or respective owner