what is the method to echo class attribute inside the i tag? [closed]

This is related to the plugin ACF.

It has to be (get_field())

<i class="'.get_field('acf_wppl_field_icon','amenities'.'_'. $term->term_id).'"></i>

instead of (the_field())

<i class="'.the_field('acf_wppl_field_icon','amenities'.'_'. $term->term_id).'"></i>

error code: 523