Verses 1-3 mention gifts without love. Verses 4-7 speak of love apart from gifts, which, if you had to choose, is much better. You see, if I really love the people whom God has given me to shepherd, I will teach them, exhort them, help them, encourage them, and so on. The emphasis of the gifts is service, and that stems from love. But love, whether gifted or not, will reach out to meet any and all the needs of the body.
Love is the fulfilling of the law.
Their problem was a lack of love. Only that will fulfill the intended purpose of the gifts and meet every need of the body.