如何从数组中获取值

时间:2015-05-15 14:18:16

标签: php arrays multidimensional-array

这是我的数组,即

我已经给出了print_r($Result);,并在下面给出了

所以输出如下,

在这里,我可以使用 FullName

通过

echo $Result['StructuredXMLResume']['ContactInfo']['PersonName']['FullName'];

但是当我尝试采用EmployerOrg

我试着把它循环

即,

foreach($Result['StructuredXMLResume']['EmployerOrg'] as $x){
    echo $x['EmployerOrgName'] . '<br />';
}

但我没有得到任何价值

即使我尝试print_r

$Result['StructuredXMLResume']['EmployerOrg'][0];

$Result['StructuredXMLResume']['EmployerOrg']

两者都是空的。

我怎么能得到它?

格式化数组:

/1430714172resume.docxArray (
[ResumeId] => Array (
[@attributes] => Array (
[ResumeParserProductName] => RecruitPlus Resume Parser
)
[ResumeParserOrgName] => ITCONS e-Solutions Private Limited
)
[StructuredXMLResume] => Array (
[ContactInfo] => Array (
[PersonName] => Array (
[FullName] => DEBRA ALLEN
[GivenName] => DEBRA
[MiddleName] => Array (
)
[FamilyName] => ALLEN
)
[ContactMethod] => Array (
[Telephone] => Array (
[PhoneBasic] => 617.405.4319
)
[Mobile] => Array (
[0] => Array (
)
)
[Fax] => Array (
[0] => Array (
)
)
[InternetEmailAddress] => Array (
[0] => allen.debra3@gmail.com
[1] => SimpleXMLElement Object (
)
)
[PostalAddress] => Array (
[CountryName] => Array (
)
[Region] => Array (
)
[City] => Array (
)
[PostalCode] => Array (
)
[DeliveryAddress] => Array (
[AdressLine1] => Array (
)
[AdressLine2] => Array (
)
)
)
)
)
[ExecutiveSummary] => Array (
)
[Objective] => Array (
)
[Role] => Array (
)
[FunctionalArea] => Array (
)
[IndustryType] => Array (
)
[EmploymentHistory] => Array (
[TotalExperience] => 20Year(
s
) & 10Month(
s
)
[TotalProjectExperience] => 19Year(
s
) & 10Month(
s
)
[CurrentSalary] => Array (
)
[ExpectedSalary] => Array (
)
[EmployerOrg] => Array (
[0] => SimpleXMLElement Object (
[EmployerOrgName] => Vantage Travel
[PositionHistory] => SimpleXMLElement Object (
[CurrentEmplyor] => True
[Title] => Traffic Manager
[OrgName] => SimpleXMLElement Object (
[OrgName] => Vantage Travel
)
[Description] => Vantage Travel (
Travel Agency
) - Boston, MA September 2014 - February 2015 Traffic Manager Create and manage the production schedule using Quad/Graphics Plan System to gather and interrupt requirements received from business owners Serve as the key liaison with teams: Brand Management, Creative, Production, Marketing and Circulation Ensure all projects are on time and accurate within agreed upon timeframe and communicate between departments Enforce creative deadlines and work-flow processes Communicate conflicts, delays or unusual situations to all parties; expedite and prioritize rush projects accordingly Work closely with the Creative Team to balance workloads, evaluate time-lines and make recommendations to Creative Management and Business Owners Run and manage all Traffic related reports Welcome new projects and consider companywide implications as well as departmental Identify opportunities for the Traffic department and manage guidelines and process documentation
[StartDate] => SimpleXMLElement Object (
[AnyDate] => 9/1/2014
)
[EndDate] => SimpleXMLElement Object (
[Anydate] => 2/1/2015
)
)
)
[1] => SimpleXMLElement Object (
[EmployerOrgName] => J. Jill
[PositionHistory] => SimpleXMLElement Object (
[CurrentEmplyor] => False
[Title] => Executive Assistant to three Senior Vice
[OrgName] => SimpleXMLElement Object (
[OrgName] => J. Jill
)
[Description] => J. Jill (
Clothes/Retail
) - Quincy, MA February 2014 - May 2014 Executive Assistant to three Senior Vice Presidents Heavy calendar management and Travel arrangements, executing expense reports on time Project work-updating Excel spreadsheets, printing weekly reports for high level meetings Working hand-and-hand with Human Resources onboarding new senior employees
[StartDate] => SimpleXMLElement Object (
[AnyDate] => 2/1/2014
)
[EndDate] => SimpleXMLElement Object (
[Anydate] => 5/1/2014
)
)
)
[2] => SimpleXMLElement Object (
[EmployerOrgName] => StavisSeafoods, Inc
[PositionHistory] => SimpleXMLElement Object (
[CurrentEmplyor] => False
[Title] => Executive Assistant
[OrgName] => SimpleXMLElement Object (
[OrgName] => StavisSeafoods, Inc
)
[Description] => StavisSeafoods, Inc. (
Third Generation Family Owned Fish Company
) - Boston, MA July 2011-February 2014 Executive Assistant to President and Chief Executive Officer Excellent time management skills, meeting coordination and advance calendar management Domestic/international travel and executing expense reports on time Provide agendas and take meeting minutes-distribute to attendees to drive action items Create PowerPoint presentations and Excel worksheets, exceptional proofing skills Event planning which includes tradeshow experience, arrange company luncheons, manage employee milestone anniversaries Interact with board members, coordinate quarterly meetings Excellent telephone manner, verbal &written communication skills Oversee other administrative staff Public relations personality: ability to establish a strong rapport with top-level executives, co-workers and clients Practice ultimate privacy in regard to confidential information
[StartDate] => SimpleXMLElement Object (
[AnyDate] => 7/1/2011
)
[EndDate] => SimpleXMLElement Object (
[Anydate] => 2/1/2014
)
)
)
[3] => SimpleXMLElement Object (
[EmployerOrgName] => Health Dialog
[PositionHistory] => SimpleXMLElement Object (
[CurrentEmplyor] => False
[Title] => Executive Assistant
[OrgName] => SimpleXMLElement Object (
[OrgName] => Health Dialog
)
[Description] => Health Dialog (
Healthcare
) - Boston, MA October 2010 - March 2011 Executive Assistant to the Vice President of Market Development Manage a complex calendar, including extensive travel arrangements-domestic/ international Follow company travel policy, cost saving initiatives, and manage expense reports Preparation for off-site executive meetings/special events and PowerPoint presentations
[StartDate] => SimpleXMLElement Object (
[AnyDate] => 10/1/2010
)
[EndDate] => SimpleXMLElement Object (
[Anydate] => 3/1/2011
)
)
)
[4] => SimpleXMLElement Object (
[EmployerOrgName] => New Boston Fund, Inc
[PositionHistory] => SimpleXMLElement Object (
[CurrentEmplyor] => False
[Title] => Executive Assistant
[OrgName] => SimpleXMLElement Object (
[OrgName] => New Boston Fund, Inc
)
[Description] => New Boston Fund, Inc. (
Real Estate
) - Boston, MA June 2005 - October 2010 Executive Assistant to the Chief Investment Officer and Acquisitions Team Coordinate heavy travel arrangements for CIO and team,manage expense reports Heavy calendar management Preparation for annual investor meetings-advanced PowerPoint presentation Interface between all departments
[StartDate] => SimpleXMLElement Object (
[AnyDate] => 6/1/2005
)
[EndDate] => SimpleXMLElement Object (
[Anydate] => 10/1/2010
)
)
)
[5] => SimpleXMLElement Object (
[EmployerOrgName] => Mellon, Private Wealth Management
[PositionHistory] => SimpleXMLElement Object (
[CurrentEmplyor] => False
[Title] => Investment Communications Manager
[OrgName] => SimpleXMLElement Object (
[OrgName] => Mellon, Private Wealth Management
)
[Description] => Mellon, Private Wealth Management (
Finance
) - Boston, MA June 2000 - June 2005 Investment Communications Manager Develop and implement a new intranet site for the Investment Communications Department (
composite, mutual fund performance, AIMR, and economic news
) posted to site Liaison between the fixed income, equity, international and marketing departments to disseminate internal information through different vehicles to better communicate to clients Design PowerPoint presentations on the economy, asset classes and PWM\'s strategy to better educate portfolio managers and present internal communication vehicles to new hired officers Manage the internal weekly investment management call - coordinated speakers
[StartDate] => SimpleXMLElement Object (
[AnyDate] => 6/1/2000
)
[EndDate] => SimpleXMLElement Object (
[Anydate] => 6/1/2005
)
)
)
[6] => SimpleXMLElement Object (
[EmployerOrgName] => Shuster Laboratories, Inc
[PositionHistory] => SimpleXMLElement Object (
[CurrentEmplyor] => False
[Title] => Marketing Manager
[OrgName] => SimpleXMLElement Object (
[OrgName] => Shuster Laboratories, Inc
)
[Description] => Shuster Laboratories, Inc. (
Full Service Laboratory
) - Quincy, MA June 1999 - June 2000 Marketing Manager Develop and implement employee customer service reward system Manage marketing materials, one page information sheets and brochures Attend and manage all aspects for tradeshows
[StartDate] => SimpleXMLElement Object (
[AnyDate] => 6/1/1999
)
[EndDate] => SimpleXMLElement Object (
[Anydate] => 6/1/2000
)
)
)
[7] => SimpleXMLElement Object (
[EmployerOrgName] => Dunkin Donuts, Corporate Office
[PositionHistory] => SimpleXMLElement Object (
[CurrentEmplyor] => False
[Title] => Retail Concept Integration/Marketing and Communications Associated Manager
[OrgName] => SimpleXMLElement Object (
[OrgName] => Dunkin Donuts, Corporate Office
)
[Description] => Dunkin Donuts, Corporate Office (
Food/Retail
) - Randolph, MA July 1994 - May1999 Retail Concept Integration/Marketing and Communications Associated Manager Implement steps to rollout Intranet site Serve as an editor and photographer for various company publications Design and implement the Retrofit Tracking System tool for new store remodels and installation of bagel ovens-trained employees how to operate Attend new store openings and worked with Marketing and Operations to rollout new store image; signage, messaging and rollout an improved operating system
[StartDate] => SimpleXMLElement Object (
[AnyDate] => 7/1/1994
)
[EndDate] => SimpleXMLElement Object (
[Anydate] => 5/1/1999
)
)
)
)
)
[EducationHistory] => Array (
[SchoolOrInstitution] => Array (
[0] => SimpleXMLElement Object (
[@attributes] => Array (
[SchoolType] => College
)
[School] => SimpleXMLElement Object (
[SchoolName] => Emmanuel College
)
[SchoolLocation] => Boston
[Degree] => SimpleXMLElement Object (
[@attributes] => Array (
[DegreeType] => Graduate/ Undergraduate
)
[IsHighestDegee] => True
[DegreeName] => Bachelor
[DegreeDate] => SimpleXMLElement Object (
[0] => SimpleXMLElement Object (
)
)
[DegreeMajor] => SimpleXMLElement Object (
[Name] => Science
)
[EducationDetails] => Science
[DegreeMeasure] => SimpleXMLElement Object (
[EducationMeasure] => SimpleXMLElement Object (
[MeasureSystem] => SimpleXMLElement Object (
)
[MeasureValue] => SimpleXMLElement Object (
[0] => SimpleXMLElement Object (
)
)
)
)
[DateofAttendance] => SimpleXMLElement Object (
[StartDate] => SimpleXMLElement Object (
[0] => SimpleXMLElement Object (
)
)
[EndDate] => SimpleXMLElement Object (
[0] => SimpleXMLElement Object (
)
)
)
[EducationDescription] => BSBA, Bachelor of Sciences in Business Administration, Emmanuel College, Boston, MA
)
)
[1] => SimpleXMLElement Object (
[@attributes] => Array (
[SchoolType] => College
)
[School] => SimpleXMLElement Object (
[SchoolName] => Fisher College
)
[SchoolLocation] => SimpleXMLElement Object (
)
[Degree] => SimpleXMLElement Object (
[@attributes] => Array (
[DegreeType] => Graduate/ Undergraduate
)
[IsHighestDegee] => False
[DegreeName] => SimpleXMLElement Object (
)
[DegreeDate] => SimpleXMLElement Object (
[AnyDate] => 1/1/2006
)
[DegreeMajor] => SimpleXMLElement Object (
[Name] => Science
)
[EducationDetails] => Science
[DegreeMeasure] => SimpleXMLElement Object (
[EducationMeasure] => SimpleXMLElement Object (
[MeasureSystem] => SimpleXMLElement Object (
)
[MeasureValue] => SimpleXMLElement Object (
[0] => SimpleXMLElement Object (
)
)
)
)
[DateofAttendance] => SimpleXMLElement Object (
[StartDate] => SimpleXMLElement Object (
[0] => SimpleXMLElement Object (
)
)
[EndDate] => SimpleXMLElement Object (
[AnyDate] => 1/1/2006
)
)
[EducationDescription] => AA, Liberal Arts, Quincy College, Quincy, MA Fisher College, Paralegal Certificate Dale Carnegie, Presentation Training Emergency Medical Services, EMT - January 2006
)
)
)
)
[LicensesAndCertifications] => Array (
[LicenseOrCertification] => Array (
)
[Name] => EMT
)
[Qualifications] => Array (
[Competency] => Array (
[0] => SimpleXMLElement Object (
[@attributes] => Array (
[Name] => Brand Management
)
[0] => SimpleXMLElement Object (
)
)
[1] => SimpleXMLElement Object (
[@attributes] => Array (
[Name] => Marketing
)
[LastUsedDate] => 2/1/2015
)
[2] => SimpleXMLElement Object (
[@attributes] => Array (
[Name] => Circulation
)
[LastUsedDate] => 2/1/2015
)
[3] => SimpleXMLElement Object (
[@attributes] => Array (
[Name] => Retail
)
[LastUsedDate] => 5/1/2014
)
[4] => SimpleXMLElement Object (
[@attributes] => Array (
[Name] => Healthcare
)
[0] => SimpleXMLElement Object (
)
)
[5] => SimpleXMLElement Object (
[@attributes] => Array (
[Name] => PowerPoint
)
[LastUsedDate] => 2/1/2014
)
[6] => SimpleXMLElement Object (
[@attributes] => Array (
[Name] => Liaison
)
[LastUsedDate] => 6/1/2005
)
[7] => SimpleXMLElement Object (
[@attributes] => Array (
[Name] => Intranet
)
[LastUsedDate] => 5/1/1999
)
[8] => SimpleXMLElement Object (
[@attributes] => Array (
[Name] => Operations
)
[LastUsedDate] => 5/1/1999
)
)
)
[languages] => Array (
)
)
[ResumeAdditionalItems] => Array (
[ResumeAdditionalItem] => Array (
[0] => SimpleXMLElement Object (
[@attributes] => Array (
[type] => Personal
)
[FatherName] => SimpleXMLElement Object (
)
[DateOfBirth] => SimpleXMLElement Object (
)
[Age] => SimpleXMLElement Object (
)
[Gender] => Unspecified
[Nationality] => SimpleXMLElement Object (
)
[MaritalStatus] => Unspecified
[PassportNo] => SimpleXMLElement Object (
)
[VisaStatus] => SimpleXMLElement Object (
)
[Currentlocation] => Boston
)
[1] => SimpleXMLElement Object (
[@attributes] => Array (
[type] => Resume Parsing Information
)
[ResumeParsingStartDate] => 4/29/2015 12:00:00 AM
[ResumeParsingExpiryDate] => 5/5/2015 12:00:00 AM
[NumberOfParsedResume] => 72
[MaxLimitOfParsedResume] => 100
)
)
)
[ResumeContext] => The candidate is working as with a good working Experience of 20Year(
s
) & 10Month(
s
) and Skilled in Brand Management, Marketing, Circulation, Retail, Healthcare, PowerPoint, Liaison, Intranet, Operations. The Current Salary: and Expected Salary: . Candidate\'s Functional Area seems to be: and Industry is ; Currently located at . The candidate posses Bachelor with major as Science
[ResumeTextFormat] => Array (
)

1 个答案:

答案 0 :(得分:1)

因为我可以看到你错过了EmploymentHistory级别。所以它应该是$Result['StructuredXMLResume']['EmploymentHistory']['EmployerOrg'][0];