Skip to content

Instantly share code, notes, and snippets.

@adatta02
Created December 13, 2012 16:15
Show Gist options
  • Save adatta02/4277546 to your computer and use it in GitHub Desktop.
Save adatta02/4277546 to your computer and use it in GitHub Desktop.
foreach( $userIdProductIdTable as $userId => $productArray ){
foreach( $productArray as $productId => $tpIds ){
$total = 0;
foreach( $tpIds as $id ){ $total += $keyedResults[$id]["total"]; }
foreach( $tpIds as $id ){ $keyedResults[$id]["total"] = $total; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment