Why does the sound on my iPhone apps not work?

Okays, so all of a sudden the sound for my little iPhone apps don't work. But that's all. The apps I have are Robot Unicorn Attack and Doodle Jump, but like, that's the only ones that I can't hear through the speakers, Though I can hear like, songs and videos through the speakers. But like, it everything works fine through headphones, just not straight from the iPhone. Does anybody know how to fix this?

Switch the ringer, located on the top left side of your iPhone, from OFF to ON. Problem solved.