Sometimes when fighting trainers and gym leaders, I may receive experience from defeating the first or first few pokemon, but then stop receiving experience from latter or final pokemon in the battle. This has been the case with Misty, Jackson, Surge, Greg (eevee greg), and occasional random other trainers.
It doesn't say I've gained 0 experience, it just skips over experience. And whenever this occurs, at the end of the battle I always get 0 pokedollars for winning.
At first I thought that, perhaps this was intentional, but my friend has gained experience and pokedollars on battles where I did not.
I have unsupported suspicions that this may be related to connection problems during the battle.