[eluser]Publisher1[/eluser]
[quote author="Cgull" date="1373804591"]Try this maybe:
$a_result_rebuilt['id_object_pattern']['id_object'] = array();
$a_result_rebuilt['id_object_pattern']['id_object'][] = $o_attributes->id_object;[/quote]
Thanks for the suggestion, but this also generates the error.
I don't knot why, i rebuilt the key generatings in my for each from new. Now the code works, whitout giving me the illegal error.
Code:
foreach($a_result as $i_key => $o_attributes) {
if($o_attributes->value_fielddef != null) {
$a_result_rebuilt['Pattern ID: ' . $o_attributes->id_object_pattern_table_objects]['attributes_pattern']['pattern_id'] = $o_attributes->id_object_pattern_table_objects;
$a_result_rebuilt['Pattern ID: ' . $o_attributes->id_object_pattern_table_objects]['attributes_pattern']['pattern_name'] = $o_attributes->name_object_pattern;
$a_result_rebuilt['Pattern ID: ' . $o_attributes->id_object_pattern_table_objects]['objects']['Object ID: ' . $o_attributes->id_object]['object_id'] = $o_attributes->id_object;
$a_result_rebuilt['Pattern ID: ' . $o_attributes->id_object_pattern_table_objects]['objects']['Object ID: ' . $o_attributes->id_object]['object_name'] = $o_attributes->name_object;
$a_result_rebuilt['Pattern ID: ' . $o_attributes->id_object_pattern_table_objects]['objects']['Object ID: ' . $o_attributes->id_object]['object_attributes']['Fielddef ID: ' . $o_attributes->id_fielddef]['name'] = $o_attributes->name_fielddef;
$a_result_rebuilt['Pattern ID: ' . $o_attributes->id_object_pattern_table_objects]['objects']['Object ID: ' . $o_attributes->id_object]['object_attributes']['Fielddef ID: ' . $o_attributes->id_fielddef]['lang'] = $o_attributes->lang_fielddef;
$a_result_rebuilt['Pattern ID: ' . $o_attributes->id_object_pattern_table_objects]['objects']['Object ID: ' . $o_attributes->id_object]['object_attributes']['Fielddef ID: ' . $o_attributes->id_fielddef]['type'] = $o_attributes->type_fielddef;
$a_result_rebuilt['Pattern ID: ' . $o_attributes->id_object_pattern_table_objects]['objects']['Object ID: ' . $o_attributes->id_object]['object_attributes']['Fielddef ID: ' . $o_attributes->id_fielddef]['value'] = $o_attributes->value_fielddef;
}
}
I really don't know why this works, and the first code didn't worked.
(Its not a small code, i am sorry for that ;-))
So it's solved!
Thanks anyway!