php - SimpleXML node attribute loop -


I'm having a problem that how do I change the following time in a while, I know how to make it a little longer But I'm working with simple XML code to throw me at all.

My code receives the first or the last attribute but I need all of them.

Can anyone help

  Lt; Php foreach (current ($ xml- & gt; xpath ('/ * / gig [last])')) - & gt; Features () as $ $} {}? & Gt;  

I do not know what your real code looks like, but it works:

  $ xml = simplexml_load_string (' gt; & lt; / gigs & gt; ); In the form of {var_dump ($ k, the current ($ xml- & gt; xpath ('/ * / gig [last ()]')) - & gt; Properties ($$ k = & gt; $ v) $ V);}  

Each attribute is listed, its two names ($ k) and its value ($ v)


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -