Create an associative array with values as an array from an another associative array
By iterating through array_keys($rows), you are not using the $results associative array effectively.  You should be able to just write this:

foreach ($results as $result) {
    $rows[$result['id']][] = $result['year'];
}


Also, there is no need to call array_push() if you are appending just one item.  You can just assign $rows[] = with no index to indicate that you want to append one element.