10/13/2016 at 10:09 am
#395556
Keymaster
@ cwalt2166
You can use this:
$email = $entry->getEmailAddresses();
This will retrieve all addresses as an array, so you only need to pop off the first.
You could also limit the result to 1, like this:
$email = $entry->getEmailAddresses( array( 'limit' => 1 ) );
The result will still be an array, but limited to only 1 email address.
Either way to get just the address you can do this:
$email[0]->address
Hope that helps!
