Php Check If Last Element In Array