Sorry but your coding is wrong for what I want. $tempResult is an array of objects, not an object of arrays.
$tempResult[0]->prop1 = 1;
$tempResult[0]->prop2 = 2;
$tempResult[0]->prop3 = 3;
$tempResult[1]->prop1 = 1000;
$tempResult[1]->prop2 = 0;
$tempResult[1]->prop3 = 999999999;
what I am doing first is this to $tempResult in one class method:
[code=php]
// NEW 12/8/2004: THIS IS FOR combineResults() AND FOR THE $this->newlyAssociatedHTML DISPLAY IN getAssociationDisplayHTML() METHOD
if (is_array($tempResult) && @sizeof($tempResult) > 0)
array_walk($tempResult, create_function('&$a', '$a->newly_associated_id = "$a->associated_section_value";'));
OK, so that should add the property "newly_associated_id" onto each array element (each array element is an object) in $tempResult:
print_r(get_object_vars($tempResult[0])); // SHOULD PRINT array ([0] => prop1; [1] => prop2; [2] => prop3; [4] => newly_associated_id )
however, when you do this:
array_walk($tempResult, create_function('&$a', '$a = serialize($a);'));
You will have a serialized string in each array element of $tempResult, however, your serialized string will look like this:
;s:19:"newly_associated_id";s:4:"1841";}";";";";";";
And so it keeps appending "; at the end of the serialized string every time.
Phil