I've simplified this piece as you've suggested except I am appending the phone and extension to the end of $info. I've done this because I think it makes sense to retain that information as the last unique entry isn't always the one you need.