[support] Issue picking a value from an array

Mutuku Ndeti jnmutuku at gmail.com
Sat Mar 24 00:15:32 UTC 2012


Hi,

I have picked an array from a custom node using entity_load.  I am
trying to get the email value but it does not work.

$email->field_email['und'][0]['value']; gives me nothing

below is my print_r output

stdClass Object ( [5] => stdClass Object ( [vid] => 5 [uid] => 1
[title] => John Doe [log] => [status] => 1 [comment] => 0 [promote] =>
0 [sticky] => 0 [nid] => 5 [type] => supplier [language] => und
[created] => 1332514672 [changed] => 1332514672 [tnid] => 0
[translate] => 0 [revision_timestamp] => 1332514672 [revision_uid] =>
1 [body] => Array ( ) [field_email] => Array ( [und] => Array ( [0] =>
Array ( [value] => John.Doe at jdoe.com [format] => [safe_value] =>
John.Doe at jdoe.com ) ) ) [field_contact_name] => Array ( [und] => Array
( [0] => Array ( [value] => John Doe [format] => [safe_value] => John
Doe ) ) ) [name] => admin [picture] => 0 [data] => b:0; ) )

-- 
Tel:254- 722-490994
www.agile.co.ke | www.jipambe.com


More information about the support mailing list