If only this were true! How nice it would be to be able to drink as much as you wanted, then negate any nasty aftereffects by downing a juicy burger or some hot, salty fries. (Is that why we like a greasy spoon after a night of drinking?) Food can definitely help prevent a hangover. But you have to eat before you start drinking for this to occur. If you've eaten first, your stomach will be busy digesting your meal once you start knocking them back.
Fatty foods like pizza take the longest time to digest and are your best choice. Any alcohol you ingest will thus reach your bloodstream more slowly. This means you'd have to drink quite a bit of booze and/or drink for a long time to become drunk and develop a hangover. Haven't eaten much since lunch? Then it won't take too many martinis to become inebriated. Rather than gobbling down some tacos or pancakes afterward, though, it's best to drink some water before turning in for the night [source: Hudepohl].