code: public static function addItemAsArray(&$array, $key, $item)
      {
          $array_key = $key . '[]';
          if (array_key_exists($array_key, $array)) {
              $array[$array_key][] = $item;
          } else {
              $array[$array_key] = array($item);
          }
      }
docs: Adds a value as an array of one, or appends to an existing array elements
  
  @param unknown_type $array
  @param unknown_type $item