How To Get Custom Profil Field Name And Their Values?

How to get custom profil field names and values? When I check by fn_print_die I only see below:


[fields] => Array ( [64] => 9999999999999999 [65] => 88888777         ) 
Hello
I use this function to extract data from an order or profile field.
function fn_find_add_field($field_name = "", $order_id = 0, $user_id = 0)
{
if(!empty($field_name)) {
$field_id = db_get_field("SELECT field_id FROM ?:profile_fields WHERE field_name = ?s", $field_name);
if($field_id) {
if(isset($order_id) && $order_id > 0) {
$return = db_get_field(
"SELECT value FROM ?:profile_fields_data"
. " WHERE object_id = ?i AND object_type = ?s AND field_id = ?i", $order_id, 'O', $field_id
);
if(empty($return)) {
if($user_id > 0) {
$return = db_get_field(
"SELECT value FROM ?:profile_fields_data"
. " WHERE object_id = ?i AND object_type = ?s AND field_id = ?i", $user_id, 'U', $field_id
);
if(!empty($return)) {
return $return;
} // end if
} // end if
} else {
return $return;
} // end if
} // end if
} // end if
} // end if
} // end function fn_find_add_field
Best regards
Robert

How to get custom profil field names and values? When I check by fn_print_die I only see below:


[fields] => Array ( [64] => 9999999999999999 [65] => 88888777         ) 

Try to use built-in function

E.g.

$_data = fn_get_profile_field(64);
fn_print_die($_data);