A simpler way of doing this is $parentIds[] = 0