/ Published in: PHP
I needed to know the first time a user took a quiz and the last quiz they took. I utilized php count() and as I iterated through the array, I incremented a variable ($i) which before the loop, I already set it to 1. If $i was equal to 1, I printed it out. If I was equal to the total count, I printed it out. Everything else got ignored.