php - Access a specific value from Multidimensional array -


i have multidimensional array , want access specific value without doing loop.. possible?

here's array:

    array ( [0] => stdclass object     (         [akeebasubs_user_id] => 205         [user_id] => 268         [isbusiness] => 0         [businessname] => sci555         [occupation] =>          [vatnumber] =>          [viesregistered] => 0         [taxauthority] =>          [address1] => ma. cristina st.         [address2] => negros oriental         [city] => dumaguete         [state] => ia         [zip] => 6200         [country] => bs         [params] => {"work_telephone":"232424","hospital_company":"sci5","company_introductory":"test","organization_type":"","applicant_url":"www","user_title":"","year_established":"","parent_company":"","r_01":"","r_02":"","r_03":"","r_04":""}         [notes] => <p>test</p>     )  ) 

what want access user_id 268 directly.

you need following:

var_dump($array[0]->user_id); 

$arrayis one-entry array contains stdclass object (you access object property using ->).


Comments

Popular posts from this blog

gcc - MinGW's ld cannot perform PE operations on non PE output file -

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

c# - Search and Add Comment with OpenXML for Word -