You should nest two foreach.
Like this:
PHP Code:
foreach($mainCounters as $mainCounter) {
//$mainCounter will have the array in userID so...
foreach($mainCounter as $key =>$value)
{
//First Iteration: $key = 'itemOwnerCommentCount'; $value = 0
//Second Iteration: $key = 'notItemOwnerCommentCount'; $value = 0;
}
}