Devam Ediyor

523888 Easy/Quick - Combine Two Arrays by Value

I need a php function that will combine two arrays by value.

Example:

----------

Array 1 Data (Main List):

Array

(

[1] => Array

(

[id] => 1

[name] => James

)

[2] => Array

(

[id] => 2

[name] => Mark

)

[3] => Array

(

[id] => 3

[name] => John

)

[4] => Array

(

[id] => 4

[name] => Adam

)

[5] => Array

(

[id] => 5

[name] => Sue

)

)

Array 2 Data (To sort main list by):

Array

(

[0] => 4

[1] => 3

[2] => 1

[3] => 5

[4] => 2

)

The values of array 2 should match the values of array 1 for the key 'id'.

The end result should display the list (array) in the following order

4 - Adam

3 - John

1 - James

5 - Sue

2 - Mark

Please PM questions

Beceriler: Her şey Kabul, PHP

Daha fazlasını görün: sort array c, james list, Value, sue, quick order, combine, Arrays, combine order, php array quick sort, easy questions, php function match data, quick sort, sort arrays, quick function, sort php list data, quick sort php, combine php, array easy php, php array sort value, php array sort, combine list php, match combine result, data list sort

İşveren Hakkında:
( 60 değerlendirme )

Proje NO: #2269826

Seçilen:

0 gün içinde 25$ USD
(0 Değerlendirme)
0.0