Change while loop with foreach and count with !empty
Merge pull request #27 from acidvertigo/patch-27

Change while loop with foreach and count with !empty