zion 1 Posted January 21 Posted January 21 (edited) Hello, I am developing a website to receive orders from several prestashop. I bring the orders from php with; $ opt = [ 'resource' => 'orders', 'display' => '[id, reference, total_paid, id_customer, id_cart, id_address_delivery, current_state, payment, date_add]', 'sort' => '[id_DESC]', 'limit' => '10' ]; $ xml = $ webService-> get ($ opt); $ resources = $ xml-> orders-> children (); I have tried to change the sort to "date_add_DESC" but it does not return anything. I have thought about ordering the array when I have filled it with php's usort () function, usort($ArrayPedidos, function ($a, $b) { return strcmp($a["fecha"], $b["fecha"]); }); but I can't, any help would be good for me. thanks. Edited January 21 by anderrios (see edit history) Share this post Link to post Share on other sites
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now