6
I have the following array returned from a webservice (in the image I identify what I want, below the text for copy):
Array
(
[DataTable] => Array
(
[ID] => STOCK
[Line] => Array
(
[0] => Array
(
[Fields] => Array
(
[0] => Array
(
[FieldID] => ItemCode
[Value] => 1GADEME010001
)
[1] => Array
(
[FieldID] => ItemName
[Value] => Sucata de ferro
)
[2] => Array
(
[FieldID] => FrgnName
[Value] => Array
(
)
)
[3] => Array
(
[FieldID] => ItmsGrpCod
[Value] => 112
)
[0] => Array
(
[Fields] => Array
(
[0] => Array
(
[FieldID] => ItemCode
[Value] => 1GADEME010001
)
[1] => Array
(
[FieldID] => ItemName
[Value] => Armário de ferro
)
[2] => Array
(
[FieldID] => FrgnName
[Value] => Array
(
)
)
[3] => Array
(
[FieldID] => ItmsGrpCod
[Value] => 112
)
Since the array has n records, I want to sort the array by name, which is underlined in red. I tried to use https://stackoverflow.com/questions/2699086/sort-multi-dimensional-array-by-value but without success.
Take a look to see if my answer helps :)
– Wallace Maxters
Put text instead of photo please.
– Guilherme Nascimento
@Guilhermenascimento already added in code
– pc_oc