Question: What I want is the pid of an array. Does it exist in the second array? If it is less or more, an error will be returned. If there are both, the id of the first array is the id of the childer of the second array. If they are equal, remove the remaining children of the second array and only keep the equal ones;
Array 1 :
Array
(
[0] => Array
(
[pid] => 47
[ID] = & gt; 48
##)# [1] = & GT; Array
## (# [pid] => 52 [id] => 54 )## [2] => Array
(
because by ] => Array
(
# [4] => Array
(
) [pid] => 63
[id] => 65
)
)
Array 2:
Array
(
[0] = & gt; array
(
[ID] = & gt; 47
## [pid] = & gt; 0## [type] = & gt
## #( [ID] = & GT; 48## [Pid] = & GT; 47
## [Type] = & GT; 2# [Attribute_name] => Mainland China Bank
[price_percentage] => 2%
[id] => 49
pid] => 47
. [price_percentage] => 2%
[id] => 50
[pid] =>47
[price_percentage] => ; 2%
’s ’ s ‐ ‐ ‐ ‐ ‐ to ‐ ‐ ‐ ‐ ‐ ‐ ‐ to ’ s ‐ ‐ ‐ ‐ ‐ [id] => 51
[Pid] = & GT; 47
## [Type] = & GT; 2## [Attribute_name] = & GT [price_percentage] => 2%
)
##)
## [1] => Array ( ) [id] => 52 > Array ’ ’ way ‐ ‐ ‐ P P P L P L P T P L M L P & T; [id] => 53 pid] = & gt; 52 [Type] = & GT; 2## [Attribute_name] = & GT; ; 2%
’s ’ s ‐ ‐ ‐ ‐ ‐ to ‐ ‐ 1 to 1 [id] => 54
] => Out of warranty or the warranty period is less than 1 natural month
## [2] => Array [id] => 55 [pid] => 0
[childer] => Array
(
[0] => Array
(
[id] => 56
[pid] => 55
[type] => 2
[attribute_name] => A1863全网通
[price_percentage] => 2%
)
[1] => Array
(
[id] => 57
[pid] => 55
[type] => 2
[attribute_name] => 其他
[price_percentage] => 2%
)
)
)
[3] => Array
(
[id] => 58
[pid] => 0
[type] => 2
[attribute_name] => 机身颜色
[childer] => Array
(
[0] => Array
(
[id] => 59
[pid] => 58
[type] => 2
[attribute_name] => 金色
[price_percentage] => 2%
)
[1] => Array
(
[id] => 60
[pid] => 58
[type] => 2
[attribute_name] => 白色
[price_percentage] => 2%
)
[2] => Array
(
[id] => 61
[pid] => 58
[type] => 2
[attribute_name] => 黑色
[price_percentage] => 2%
)
[3] => Array
(
[id] => 62
[pid] => 58
[type] => 2
[attribute_name] => 红色
[price_percentage] => 2%
)
)
)
[4] => Array
(
[id] => 63
[pid] => 0
[type] => 2
[attribute_name] => 存储容量
[childer] => Array
(
[0] => Array
(
[id] => 64
[pid] => 63
[type] => 2
[attribute_name] => 256G
[price_percentage] => 2%
)
[1] => Array
(
[id] => 65
[pid] => 63
[type] => 2
[attribute_name] => 128G
[price_percentage] => 2%
)
[2] => Array
(
[id] => 66
[pid] => 63
[type] => 2
[attribute_name] => 64G
[price_percentage] => 2%
)
)
)
)