If a number have same number get_avatar

This is working code that gets the data from a field that registered users have to fill out in their profiles in wordpress:

<?php 
    $field = xprofile_get_field_data(2, $user_id); 
    echo '<span class="wisfb_carNumber">' . $field . '<span>';
?>

This is the code that generates data from a Excel-file:

Read More
<?php $data = wp_excel_cms_get("EXCEL-DOCUMENT"); ?>

<?php foreach($data as $entry): ?> 

    <?php echo $entry[1]; ?>

<?php endforeach; ?>

Now I want to do this:

If the number witch is generated in <?php echo $entry[1]; ?> is the same number as in the users $field = xprofile_get_field_data(2, $user_id); get this users avatar.

Does anyone have an idea on how to do this?

Related posts

Leave a Reply