Which is better 1080p or 1080i?

Both 1080i and 1080p have an identical resolution on the screen. For static images, there is no difference between the two. The difference between them is that 1080i uses an "interlaced" signal format. The image is generated with 2 passes of the screen. The first draws all odd numbered lines and the second draws all even numbered lines. A "progressive" format refreshes the whole image on every pass so it delivers a full image at twice the rate of an interlaced image. For fast movement, 1080p has the edge over 1080i although most would agree that the difference in perceived quality is not a big one.

Note that the format used is dependent on the program content. If it delivered as a 1080i signal, the fact that a television can handle 1080p does not make the incoming signal a 1080p format.
Also, at present, broadcasters are not using 1080p as a transmission format and are unlikely to use it for a number of years. 1080p is found only on local sources such as games players, Bluray discs and computers.