By bahman2216 on
Hi,
I make a registration form with profile2 and some fields.
I want to fetch family field with name: field_family
I used this code to display specified field:
<?php
global $user;
$uid = user_load($user->uid);
$profile_somename = profile2_load_by_user($uid, 'profile_main');
print ($profile_somename->field_family['und'][0]['value']);
?>
but it doesn't work!
Comments
Try this and see , it will work