参考我之前的问题:Show values in TDropDownList in PRADO。好的,我从查询中收到的数组是一个对象数组,例如:
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 ( ) )
如果我将其转换为数组,如:
Array ( [key 1] => leo [key 2] => ganda )
然后我可以将值填充到 TDropDownList 中。
现在谁能帮我转换我需要的数组结构......?
再次感谢