I have a custom field in my wordpress user profile : instrument
I have two users with the role subscriber. One hav the instrument Altosaxofon and one Tenorsaxofon.
With this code I want to display "Tenorsaxofon", but I get "TenorsaxofonTenorsaxofon"
<?php
$args1 = array('role' => 'subscriber');
$subscribers = get_users($args1);
foreach ($subscribers as $user) {
if ( $user->instrument = 'Tenorsaxofon' )
{
echo $user->instrument ;
}
}
?>
Why is that?
Best regards, Kresten