Zend certified PHP/Magento developer

How to Add Custom customer Attributes in Account Page?

After adding a custom customer attribute with a dropdown, having values ‘A (11)’ and ‘B (12)’, I attempted to display the attributes on the customer account page. However, upon adding the following code to the ‘info.phtml’ file, I received values instead of names.

https://prnt.sc/UE6AIMR5uiZj

getCustomer()->getCustomAttribute(‘customer_name’);

if ($customAttribute) {

echo $block->escapeHtml($customAttribute->getValue());
}
?>