php - Choosing Last Node in SimpleXML -


I want to find the property of the last node in the XML file.

The following code is the attribute of the first node of search. Is there any way to find the last node?

  foreach ($ xml-> gig [0] - & gt; Attributes () as the $ id) {} ​​ 

Thanks < / P>

 

> foreach ($ xml- & gt; xpath ("// gig [last ()]") [0] -> property ($ id)) {}


Comments

Popular posts from this blog

objective c - iPhone and it's wireless area -

unix - Listing all shared memory segments used by a process on AIX5.3+ -

.net - Self Tracking Entities (STE)'s and partial updates with EF4 and mVC2 -