im having a big trouble while trying to separate arrays... look my response: Array ( [id] => aIvZpyIVPs [first-name] => Denis [last-name] => Pimentel [headline] => Training and Qualification Coordinator at Air Liquide [picture-url] => http://ift.tt/XtxYR0 [public-profile-url] => http://ift.tt/1ma2LaT [industry] => Human Resources [positions] => Array ( [@attributes] => Array ( [total] => 7 ) [position] => Array ( [0] => Array ( [title] => Training and Qualification Coordinator [start-date] => Array ( [year] => 2012 [month] => 2 ) [is-current] => true [company] => Array ( [id] => 2848689 [name] => Air Liquide Brasil [size] => 1001-5000 employees ) ) [1] => Array ( [title] => Human Resources Analyst [start-date] => Array ( [year] => 2010 [month] => 2 ) [end-date] => Array ( [year] => 2012 [month] => 2 ) [is-current] => false [company] => Array ( [id] => 36403 [name] => Mattos Filho, Veiga Filho, Marrey Jr. e Quiroga Advogados [size] => 501-1000 employees ) ) [2] => Array ( [title] => HR Consultant - Recruitment [start-date] => Array ( [year] => 2009 [month] => 4 ) [end-date] => Array ( [year] => 2010 [month] => 2 ) [is-current] => false [company] => Array ( [id] => 23148 [name] => Grupo Foco ) ) [3] => Array ( [title] => Recruitment Consultant [start-date] => Array ( [year] => 2008 [month] => 5 ) [end-date] => Array ( [year] => 2009 [month] => 1 ) [is-current] => false [company] => Array ( [id] => 23428 [name] => Case Consulting ) ) [4] => Array ( [title] => Research Analyst II [start-date] => Array ( [year] => 2007 [month] => 9 ) [end-date] => Array ( [year] => 2008 [month] => 5 ) [is-current] => false [company] => Array ( [name] => ARC Executive Talent Recruiting ) ) [5] => Array ( [title] => Researcher [start-date] => Array ( [year] => 2006 [month] => 5 ) [end-date] => Array ( [year] => 2007 [month] => 8 ) [is-current] => false [company] => Array ( [name] => Mariaca | InterSearch ) ) [6] => Array ( [title] => Junior Researcher [start-date] => Array ( [year] => 2001 [month] => 11 ) [end-date] => Array ( [year] => 2006 [month] => 5 ) [is-current] => false [company] => Array ( [name] => Faljone & Associates ) ) ) ) [languages] => Array ( [@attributes] => Array ( [total] => 3 ) [language] => Array ( [0] => Array ( [id] => 17 [language] => Array ( [name] => Portuguese ) ) [1] => Array ( [id] => 18 [language] => Array ( [name] => Spanish ) ) [2] => Array ( [id] => 16 [language] => Array ( [name] => English ) ) ) ) [educations] => Array ( [@attributes] => Array ( [total] => 3 ) [education] => Array ( [0] => Array ( [id] => 208945765 [school-name] => Fundação Getulio Vargas [notes] => EXECUTIVE MBA IN ECONOMIC AND STRATEGIC MANAGEMENT OF HUMAN RESOURCES [degree] => Master of Business Administration (MBA) [field-of-study] => Human Resources Management/Personnel Administration, General [start-date] => Array ( [year] => 2014 ) [end-date] => Array ( [year] => 2015 ) ) [1] => Array ( [id] => 2457128 [school-name] => Universidade Anhembi Morumbi [notes] => Bachelor in Business Administration [activities] => - Proud member and leader of an excelent Teamclass. - Best Experimental Project (TCC) in Business Administration - 2006. [degree] => 2006 [field-of-study] => Business Administration [start-date] => Array ( [year] => 2003 ) [end-date] => Array ( [year] => 2006 ) ) [2] => Array ( [id] => 89128585 [school-name] => Ítalo Brasileiro [notes] => Array ( ) ) ) ) )
my code is $xml_response = $linkedin->getProfile("~:(id,firstName,lastName,headline,picture-url,email-address,public-profile-url,industry,positions:(title,start-date,end-date,is-current,company:(id,name,size)),languages:(id,language,proficiency),educations,certifications:(id,name),publications:(id,title))");
i cant get results with: $data = simplexml_load_string($xml_response);
using {'first-name'}?> but if the array has child... I really can`t figure it out..
I want to select field by field in different arrays
please, help me :)
No comments:
Post a Comment