Planetary Nebula are not planets. They are dying (low or medium) mass stars expelling there outer layers.
Our Sun is consider a medium size star, and it too will create a planetary nebula at
the end of it's life.

Round Planetary Nebula M97 (lower right) and the Surfboard Galaxy (upper left)
Dumbbell Nebula - M27