Couldn't you just append to the array and use array_unique()? Having an array with mixed keys is a bit odd.