My boyfriend told me to stop talking to my friend and just ignore him but I'm thinking of going to tell them instead.
Why do you feel the need to tell them?
They're my friend and it's so much easier to tell him directly rather than trying to avoid him.
I'm glad you're deciding to be honest with your friend about the situation. It's really good to be as honest as you can be with your friends and family especially. After doing that the next step is going to be confronting your boyfriend for making you break off contact with your friend because he shouldn't do that.
Thank you for being nice and encouraging me to be friendly.
You're welcome, I am happy that you are open to my advice and I hope you can work it out with your friend and boyfriend appropriately.