Added foreach loop

Added foreach loop to echo out data. Pulled from McHale’s version.