global $user;
$profile = profile2_by_uid_load($user->
//Get exact field names by printing the array.
//Get exact field names by printing the array.
print "<pre>"; print_r($profile); print "</pre>"; // to know yourm all fields name
//Example to print profile fields
//Example to print profile fields
print $profile->field_business_name[
print $profile->field_first_name['
print $profile->field_business_
print $profile->field_street_
print $profile->field_address_line_
print $profile->field_country['und']
print $profile->field_state_
print $profile->field_city['und'][0]
print $profile->field_postal_zip_
print $profile->field_phone['und'][
print $profile->field_fax_number['
 
No comments:
Post a Comment