我怎样才能从php arrray中获取值

时间:2015-05-19 06:25:33

标签: php arrays multidimensional-array

我想采用ResumeParsingStartDate,ResumeParsingExpiryDate,MaxLimitOfParsedResume,NumberOfParsedResume

等字段

我如何在php中使用那些valuse

以下是Eval Link

这是我拥有的数组

Here is the updated code :

注意:由于stackoverflow的编辑器只允许30,000个字符,因此该字符有35,000个字符,而我无论如何都无法减少它

1 个答案:

答案 0 :(得分:1)

你可以得到这样的单一记录:

    $url = 'http://recruitplushrxmlapidemo.onlineresumeparser.com/hrxml/149Anne%20Marie%20Powell.xml';

    $sxml = simplexml_load_file($url);

    echo 'ResumeParsingStartDate --> '.$sxml->ResumeAdditionalItems->ResumeAdditionalItem[1]->ResumeParsingStartDate;        
    echo "<br />";
    echo 'ResumeParsingExpiryDate --> '.$sxml->ResumeAdditionalItems->ResumeAdditionalItem[1]->ResumeParsingExpiryDate;        
    echo "<br />";
    echo 'NumberOfParsedResume --> '.$sxml->ResumeAdditionalItems->ResumeAdditionalItem[1]->NumberOfParsedResume;        
    echo "<br />";
    echo 'MaxLimitOfParsedResume --> '.$sxml->ResumeAdditionalItems->ResumeAdditionalItem[1]->MaxLimitOfParsedResume;        
    echo "<br />";

使用循环重复元素