여러 트랜잭션이 포함 된 배열이 있고 여러 전자 메일 주소가 동일한 트랜잭션이 있습니다.php - 배열의 값을 다차원 배열의 다른 배열로 복사
일부 트랜잭션의 값은 client
입니다. 다른 사람들은 그렇지 않습니다.
항상 일치하는 배열의 client
키를 email_address
키와 함께 복사하여 client
키의 데이터를 항상 복사하려고합니다. 내 배열의
예 :
Array
(
[1] => Array
(
[client] => John John
[email_address] => [email protected]
)
[3] => Array
(
[client] => Kevin Kevin
[email_address] => [email protected]
)
[5] => Array
(
[client] =>
[email_address] => [email protected]
)
)
내가 달성하고자하는 것은 (email_address
키를 기반으로) 같은 클라이언트이기 때문에 Array [5]
가 Array [1]
로 client
키에 같은 값을 가지고 있는지 확인하는 것입니다. 생성 된 배열의
예 :
나는 배열을 통해 갈 수있는 방법Array
(
[1] => Array
(
[client] => John John
[email_address] => [email protected]
)
[3] => Array
(
[client] => Kevin Kevin
[email_address] => [email protected]
)
[5] => Array
(
[client] => John John
[email_address] => [email protected]
)
)
이 (email_address
키를 기반으로) 배열을 일치 항상 같은 client
키가 있는지 확인하기 위해?
이 ... –
@RivnatNasah 모든, 채워진'client' 키에 포함 된 어떤 데이터를 얼마나'. 그래서, Array [1]의'John John'은'Array [5]'의 John John입니다. – Lee
그래서 당신의 질문은 무엇입니까? "X를하고 싶다"또는 "X를 쓰는 코드를 작성하십시오"는 질문이 아닙니다. – melpomene