I have a BuddyPress member loop that includes the user avatar. The avatar is showing up, but outside it's wrapping html element.
if ( bp_has_members( bp_ajax_querystring( 'members' ) ) ) :
while ( bp_members() ) : bp_the_member();
$content.='You are not connected to any companies.';
This function will echo the avatar:
So it will appear as your code runs, rather than append it to