Php Array Check If Last Element Of List