I see that there is an object within as object, with $email being your object name, here it goes.<br>$email->5->field_email['und'][0]['value']; This should work for you.<br><br><div class="gmail_quote">
On Sat, Mar 24, 2012 at 5:45 AM, Mutuku Ndeti <span dir="ltr"><<a href="mailto:jnmutuku@gmail.com">jnmutuku@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I have picked an array from a custom node using entity_load. I am<br>
trying to get the email value but it does not work.<br>
<br>
$email->field_email['und'][0]['value']; gives me nothing<br>
<br>
below is my print_r output<br>
<br>
stdClass Object ( [5] => stdClass Object ( [vid] => 5 [uid] => 1<br>
[title] => John Doe [log] => [status] => 1 [comment] => 0 [promote] =><br>
0 [sticky] => 0 [nid] => 5 [type] => supplier [language] => und<br>
[created] => 1332514672 [changed] => 1332514672 [tnid] => 0<br>
[translate] => 0 [revision_timestamp] => 1332514672 [revision_uid] =><br>
1 [body] => Array ( ) [field_email] => Array ( [und] => Array ( [0] =><br>
Array ( [value] => <a href="mailto:John.Doe@jdoe.com">John.Doe@jdoe.com</a> [format] => [safe_value] =><br>
<a href="mailto:John.Doe@jdoe.com">John.Doe@jdoe.com</a> ) ) ) [field_contact_name] => Array ( [und] => Array<br>
( [0] => Array ( [value] => John Doe [format] => [safe_value] => John<br>
Doe ) ) ) [name] => admin [picture] => 0 [data] => b:0; ) )<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Tel:254- 722-490994<br>
<a href="http://www.agile.co.ke" target="_blank">www.agile.co.ke</a> | <a href="http://www.jipambe.com" target="_blank">www.jipambe.com</a><br>
--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br>Regards,<br>Vaibhav Jain<br>