php multidimensional array get all values by key
$ids = array_column($users, 'id');
php multidimensional array get all values by key
$ids = array_column($users, 'id');
get the matched value from 2 multidimensional array in php by id
<?php
$a = Array(
Array('id' => 1, 'affiliate_id' => 190),
Array('id' => 2, 'affiliate_id' => 946)
);
$b = Array(
Array('id' => 1, 'user_id' => 190),
Array('id' => 2, 'user_id' => 246),
Array('id' => 3, 'user_id' => 249),
Array('id' => 3, 'user_id' => 250)
);
$c = array_map(function ($arr) { return $arr['affiliate_id']; }, $a);
$d = array_map(function ($arr) { return $arr['user_id']; }, $b);
$e = array_intersect($c, $d);
// Output
// Array ( [0] => 190 )
?>
array in php - multidimintion
Array
(
[0] => Array
(
[0] => Adel
[1] => mona
[2] => basant
[3] => mohamed
[4] => seif
)
[1] => Array
(
[0] => Alaa
[1] => do33a
[2] => toka
[3] => yousr
[4] => eyad
)
)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us