There are, indeed, planets in other galaxies. A logical assumption to make, but as much progress as we're making on exoplanets...seeing something in Andromeda? Not likely to happen any time soon.
So, how do we know?
Simple. We look at stars that used to be in another galaxy and are now in ours. They're called the Helmi stream. And at least one of them has a planet.
Now, I suppose it could have captured said planet after drifting into the Milky Way, but Occam's Razor implies otherwise. It's not much use, though...a superJovian of about 2.4 Jupiters.
Still, where there's one...