-1
我的數組看起來像這樣。我想分開["perm_name"]
數組AND ["type_name"]
數組從["selectdata"]
數組。我無法解決這個問題。請幫我出去無法從PHP中獲取數據
array(1) {
["selectData"]=>
array(2) {
["perm_name"]=>
object(CI_DB_mysql_result)#17 (8) {
["conn_id"]=>
resource(28) of type (mysql link persistent)
["result_id"]=>
resource(34) of type (mysql result)
["result_array"]=>
array(2) {
[0]=>
array(7) {
["permission_id"]=>
string(1) "1"
["permission_name"]=>
string(4) "news"
["default_is_edit"]=>
string(1) "Y"
["default_is_view"]=>
string(1) "Y"
["default_is_delete"]=>
string(1) "Y"
["default_is_personal"]=>
string(1) "Y"
["active"]=>
string(1) "Y"
}
[1]=>
array(7) {
["permission_id"]=>
string(1) "8"
["permission_name"]=>
string(13) "movies & play"
["default_is_edit"]=>
string(1) "Y"
["default_is_view"]=>
string(1) "Y"
["default_is_delete"]=>
string(1) "Y"
["default_is_personal"]=>
string(1) "Y"
["active"]=>
string(1) "Y"
}
}
["result_object"]=>
array(0) {
}
["custom_result_object"]=>
array(0) {
}
["current_row"]=>
int(0)
["num_rows"]=>
int(2)
["row_data"]=>
NULL
}
["type_name"]=>
object(CI_DB_mysql_result)#18 (8) {
["conn_id"]=>
resource(28) of type (mysql link persistent)
["result_id"]=>
resource(37) of type (mysql result)
["result_array"]=>
array(5) {
[0]=>
array(4) {
["user_type_id"]=>
string(1) "1"
["user_type"]=>
string(5) "Admin"
["is_active"]=>
string(1) "Y"
["last_modifiled"]=>
string(19) "2012-10-05 10:38:41"
}
[1]=>
array(4) {
["user_type_id"]=>
string(1) "3"
["user_type"]=>
string(9) "Developer"
["is_active"]=>
string(1) "Y"
["last_modifiled"]=>
string(19) "2012-10-05 10:32:11"
}
}
["result_object"]=>
array(0) {
}
["custom_result_object"]=>
array(0) {
}
["current_row"]=>
int(0)
["num_rows"]=>
int(5)
["row_data"]=>
NULL
}
}
}
幫我解決這個問題。 提前致謝。
是的,但工作,但不能夠使用foreach循環數組()循環...獲取錯誤不能使用類型爲CI_DB_mysql_result的對象作爲數組 – user1688258
嘗試$ permName-> row_array(); –
仍然無法正常工作。顯示相同的錯誤信息? – user1688258