1
I created a function that makes the selectt in the database and returns the data in array and now I want to sort its answer by date example
Response returned from function
Array ( [dados-0] => Array ( [valor-0] => 300 [date-0] => 26/2/2019 )
[dados-1] => Array ( [valor-1] => 150 [date-1] => 26/2/2019 )
[dados-2] => Array ( [valor-2] => 150 [date-2] => 26/3/2019 )
[dados-3] => Array ( [valor-3] => 5000 [date-3] => 9/3/2019 )
[dados-4] => Array ( [valor-4] => 300 [date-4] => 10/3/2019 )
)
And so on I want to order from the order but old to older getting like this:
Array ( [dados-0] => Array ( [valor-0] => 300 [date-0] => 26/2/2019 )
[dados-1] => Array ( [valor-1] => 150 [date-1] => 26/2/2019 )
[dados-3] => Array ( [valor-3] => 5000 [date-3] => 9/3/2019 )
[dados-2] => Array ( [valor-2] => 150 [date-2] => 10/3/2019 )
[dados-4] => Array ( [valor-4] => 300 [date-4] => 26/3/2019 )
)
Someone can help me?
The ideal is to do this!
– Andrei Coelho
Yes I thought about it but I would have to modify several parts of the function I created, because it is not accepting the order by because it goes through a procedure before making the request to the bank, so I’m trying to find a way I can arrange without having to use the order by, and also the dates are separate would have to create an as to modify and merge to then give the ordeby
– Cyber Hacker