Skip to main content

Magento2 print customer full data array

How to print customer array full data.

public function __construct(
    \Magento\Customer\Model\Customer $customermodel,
    \Magento\Customer\Model\Address $addressmodel,
    \Magento\Customer\Api\CustomerRepositoryInterface $customer
)
{
    $this->_customer = $customer;
    $this->_address = $addressmodel;
    $this->_customermodel = $customermodel;
}
$customerData = $this->_customer->getById($customerId); 

How to print this $customerData ?

user3374995
  • 321
  • 1
  • 4
  • 10