Jump to content

Array search and sort


BlackShark

Recommended Posts

Hello Guys,

 

I have this array, that I want so sort and filter as follows:

1. Arrays[0] from REQ to TYPE(first 4 arrays) to be stored in array requests.

2. From Array[0] SPN to ITEI to be stored in array responses belonging to an ID: Responses[0][sPN->0], Responses[0][FLEN->0], Responses[1][sPN->22]Responses[1][FLEN->5]. Please note that this range SPN to ITEI is recurring.

Array
(
    [0] => REQ
    [1] => prt
)
Array
(
    [0] => CUST
    [1] => 0
)
Array
(
    [0] => FEAT
    [1] => net
)
Array
(
    [0] => TRAN
    [1] => AC1
)
Array
(
    [0] => TYPE
    [1] => SPN
)
Array
(
    [0] => SPN
    [1] => 0
)
Array
(
    [0] => FLEN
    [1] => 0
)
Array
(
    [0] => INPL
    [1] => YES
)
Array
(
    [0] => RLI
    [1] => 9
)
Array
(
    [0] => SDRR
    [1] => NONE
)
Array
(
    [0] => ITEI
    [1] => NONE
)
Array
(
    [0] => SPN
    [1] => 1
)
Array
(
    [0] => FLEN
    [1] => 0
)
Array
(
    [0] => RLI
    [1] => 9
)
Array
(
    [0] => SDRR
    [1] => NONE
)
Array
(
    [0] => ITEI
    [1] => NONE
)
Link to comment
https://forums.phpfreaks.com/topic/277289-array-search-and-sort/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.