如何快捷的取出数组里的值?
类似这样:
Array
(
[tag] => PubmedArticle
[value] => Array
(
[0] => Array
(
[tag] => MedlineCitation
[value] => Array
(
[0] => Array
(
[tag] => PMID
[value] => 25864520
[attributes] => Array
(
[Version] => 1
)
)
[1] => Array
(
[tag] => DateCreated
[value] => Array
(
[0] => Array
(
[tag] => Year
[value] => 2015
)
[1] => Array
(
[tag] => Month
[value] => 4
)
[2] => Array
(
[tag] => Day
[value] => 13
)
)
)
[2] => Array
(
[tag] => DateRevised
[value] => Array
(
[0] => Array
(
[tag] => Year
[value] => 2015
)
[1] => Array
(
[tag] => Month
[value] => 4
)
[2] => Array
(
[tag] => Day
[value] => 14
)
)
)
[3] => Array
(
[tag] => Article
[value] => Array
(
[0] => Array
(
[tag] => Journal
[value] => Array
(
[0] => Array
(
[tag] => ISSN
[value] => 1364-548X
[attributes] => Array
(
[IssnType] => Electronic
)
)
[1] => Array
(
[tag] => JournalIssue
[value] => Array
(
[0] => Array
(
[tag] => PubDate
[value] => Array
(
[0] => Array
(
[tag] => Year
[value] => 2015
)
[1] => Array
(
[tag] => Month
[value] => Apr
)
[2] => Array
(
[tag] => Day
[value] => 13
)
)
)
)
[attributes] => Array
(
[CitedMedium] => Internet
)
)
[2] => Array
(
[tag] => Title
[value] => Chemical communications (Cambridge, England)
)
[3] => Array
(
[tag] => ISOAbbreviation
[value] => Chem. Commun. (Camb.)
)
)
)
[1] => Array
(
[tag] => ArticleTitle
[value] => Anisotropic particles templated by Janus emulsion.
)
[2] => Array
(
[tag] => Pagination
[value] => Array
(
[0] => Array
(
[tag] => MedlinePgn
[value] =>
)
)
)
[3] => Array
(
[tag] => Abstract
[value] => Array
(
[0] => Array
(
[tag] => AbstractText
[value] => Anisotropic particles, with morphology from crescent to moon shape and size from micrometer to nanometer scale, are fabricated in batch scale with Janus emulsion as template. The strategy is also useful in the synthesis of Janus particles with chemically distinct hemispheres.
[attributes] => Array
(
[NlmCategory] => UNASSIGNED
)
)
)
)
[4] => Array
(
[tag] => AuthorList
[value] => Array
(
[0] => Array
(
[tag] => Author
[value] => Array
(
[0] => Array
(
[tag] => LastName
[value] => Ge
)
[1] => Array
(
[tag] => ForeName
[value] => Lingling
)
[2] => Array
(
[tag] => Initials
[value] => L
)
[3] => Array
(
[tag] => AffiliationInfo
[value] => Array
(
[0] => Array
(
[tag] => Affiliation
[value] => School of Chemistry and Chemical Engineering, Yangzhou University, Yangzhou, Jiangsu, China. llge@yzu.edu.cn guorong@yzu.edu.cn.
)
)
)
)
)
[1] => Array
(
[tag] => Author
[value] => Array
(
[0] => Array
(
[tag] => LastName
[value] => Lu
)
[1] => Array
(
[tag] => ForeName
[value] => Shuhui
)
[2] => Array
(
[tag] => Initials
[value] => S
)
)
)
[2] => Array
(
[tag] => Author
[value] => Array
(
[0] => Array
(
[tag] => LastName
[value] => Han
)
[1] => Array
(
[tag] => ForeName
[value] => Jie
)
[2] => Array
(
[tag] => Initials
[value] => J
)
)
)
[3] => Array
(
[tag] => Author
[value] => Array
(
[0] => Array
(
[tag] => LastName
[value] => Guo
)
[1] => Array
(
[tag] => ForeName
[value] => Rong
)
[2] => Array
(
[tag] => Initials
[value] => R
)
)
)
)
)
[5] => Array
(
[tag] => Language
[value] => ENG
)
[6] => Array
(
[tag] => PublicationTypeList
[value] => Array
(
[0] => Array
(
[tag] => PublicationType
[value] => JOURNAL ARTICLE
[attributes] => Array
(
[UI] =>
)
)
)
)
[7] => Array
(
[tag] => ArticleDate
[value] => Array
(
[0] => Array
(
[tag] => Year
[value] => 2015
)
[1] => Array
(
[tag] => Month
[value] => 4
)
[2] => Array
(
[tag] => Day
[value] => 13
)
)
[attributes] => Array
(
[DateType] => Electronic
)
)
)
[attributes] => Array
(
[PubModel] => Print-Electronic
)
)
[4] => Array
(
[tag] => MedlineJournalInfo
[value] => Array
(
[0] => Array
(
[tag] => MedlineTA
[value] => Chem Commun (Camb)
)
[1] => Array
(
[tag] => NlmUniqueID
[value] => 9610838
)
[2] => Array
(
[tag] => ISSNLinking
[value] => 1359-7345
)
)
)
)
[attributes] => Array
(
[Status] => Publisher
[Owner] => NLM
)
)
[1] => Array
(
[tag] => PubmedData
[value] => Array
(
[0] => Array
(
[tag] => History
[value] => Array
(
[0] => Array
(
[tag] => PubMedPubDate
[value] => Array
(
[0] => Array
(
[tag] => Year
[value] => 2015
)
[1] => Array
(
[tag] => Month
[value] => 4
)
[2] => Array
(
[tag] => Day
[value] => 14
)
[3] => Array
(
[tag] => Hour
[value] => 6
)
[4] => Array
(
[tag] => Minute
[value] => 0
)
)
[attributes] => Array
(
[PubStatus] => entrez
)
)
[1] => Array
(
[tag] => PubMedPubDate
[value] => Array
(
[0] => Array
(
[tag] => Year
[value] => 2015
)
[1] => Array
(
[tag] => Month
[value] => 4
)
[2] => Array
(
[tag] => Day
[value] => 14
)
[3] => Array
(
[tag] => Hour
[value] => 6
)
[4] => Array
(
[tag] => Minute
[value] => 0
)
)
[attributes] => Array
(
[PubStatus] => pubmed
)
)
[2] => Array
(
[tag] => PubMedPubDate
[value] => Array
(
[0] => Array
(
[tag] => Year
[value] => 2015
)
[1] => Array
(
[tag] => Month
[value] => 4
)
[2] => Array
(
[tag] => Day
[value] => 14
)
[3] => Array
(
[tag] => Hour
[value] => 6
)
[4] => Array
(
[tag] => Minute
[value] => 0
)
)
[attributes] => Array
(
[PubStatus] => medline
)
)
)
)
[1] => Array
(
[tag] => PublicationStatus
[value] => aheadofprint
)
[2] => Array
(
[tag] => ArticleIdList
[value] => Array
(
[0] => Array
(
[tag] => ArticleId
[value] => 10.1039/c5cc00935a
[attributes] => Array
(
[IdType] => doi
)
)
[1] => Array
(
[tag] => ArticleId
[value] => 25864520
[attributes] => Array
(
[IdType] => pubmed
)
)
)
)
)
)
)
)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
你这个题目问得太不清晰了。。。比如要取哪个数组里面的哪些值?
这很明显是XML转来的吧
别转成数组先直接通过XML的方式来定位吧,XPath什么的还是很强大的
foreach