Answer the question
In order to leave comments, you need to log in
How to generate such xml using php?
How to generate such xml using php?
<entry gd:etag="{lastKnownEtag}">
<id>http://www.google.com/m8/feeds/contacts/{userEmail}/base/{contactId}</id>
<updated>2008-02-28T18:47:02.303Z</updated>
<category scheme="http://schemas.google.com/g/2005#kind"
term="http://schemas.google.com/contact/2008#contact"/>
<gd:name>
<gd:givenName>New</gd:givenName>
<gd:familyName>Name</gd:familyName>
<gd:fullName>New Name</gd:fullName>
</gd:name>
<content type="text">Notes</content>
</entry>
</pre>
Answer the question
In order to leave comments, you need to log in
1. Iterate through the array and replace the value of each element with a subarray containing
2. Sort the resulting array with the uasort function, taking into account the initial values and the added serial numbers.
3. Go through the array again and replace the subarrays back with the original values they contain.
Output a sorted array from the database at once by specifying Order By ... Asc or Desc in the sql query
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question