Okay, the simple answer to your question is to redirect stderr to stdout. as what Fredik Phil mentioned in the comments.
instead of:
ping_results=$(ping -c 4 -q google.com);
use:
ping_results=$(ping -c 4 -q google.com 2>&1);
or something similar...
However, depending on what you're doing, it might be better to test if the exit code of the ping command wasis 1 (indicating that the ping endedis ending in an error), or 0 (indicating that the ping wasis successful). the exit code is stored in the variable "$?".