Created my first looping function on php.