1
我研究了在互聯網論壇上的一些解決方案來發送和ArrayCollection的到AMFPHP,但我沒有找到良好的反應,我怎麼能訪問PHP數組包括到MySQL表中。的Flex Datagrid中選擇多行和發送到AMFPHP後端
我的問題:
我有一個Flex數據網格填充了一些姓名和電子郵件,我想創造一種允許用戶創建一個組,然後選擇該名稱是該組的一部分。我在Flash Builder調試器中看到數據正在以ArrayCollection的形式發送(同樣從Vector轉換爲Object),並且問題仍然在於如何在PHP端訪問此數組。
下面是ArrayCollection中被髮送到AMFPHP:
[0] Object (@cf87311)
[1] Object (@d4bfcb9)
[2] Object (@d4d3479)
這裏是數組的鍵和值:
[0] Object (@cf87311)
id "2"
nome "David"
username "david"
[1] Object (@d4bfcb9)
id "3"
nome "jose"
username "[email protected]"
[2] Object (@d4d3479)
id "4"
nome "joao"
username "[email protected]"
有誰知道我必須做的,有機會獲得現場在這個數組中的「ID」?
祝商祺!
Rafael Tavares
感謝您的幫助! 我已經測試過,它不工作。 沒有分配用於$對象[「ID」]對象陣列的每個分量的值。 我變換矢量反對這種方式: VAR溫度:ArrayCollection的=新ArrayCollection的(); \t var selIndices:Vector。 = datagrid_grupo_usuarios.selectedIndices; \t var selItems:Vector。
你如何將AC傳遞給php? – ethrbunny
'protected function button_criar_grupo_clickHandler(event:MouseEvent):void { \t var temp:ArrayCollection = new ArrayCollection(); \t var selIndices:Vector。 = datagrid_grupo_usuarios.selectedIndices; \t var selItems:Vector。