作者:初初初初丶初崽崽__冏每_472 | 来源:互联网 | 2023-05-18 17:47
I have the an array coming from this code
我有一个来自这段代码的数组
echo "";
print_r($_SESSION["followers"]);
echo "
";
Array is
数组是
Array
(
[pagination] => Array
(
)
[meta] => Array
(
[code] => 200
)
[data] => Array
(
[0] => Array
(
[username] => SD
[profile_picture] => https://instagramimages-a.akamaihd.net/profiles/profile_4.jpg
[id] => 42114932
[full_name] => A
)
[1] => Array
(
[username] => ER
[profile_picture] => https://igcdn-photos-c-a.akamaihd.net/hphotos-ak-xpf1/t51.2885-19/1.jpg
[id] => 395834289
[full_name] => P
)
)
)
i want to know that is it possible to match specific value from array and then fetch other values related to it,
我想知道是否可以匹配数组中的特定值,然后获取与其相关的其他值,
e.g I am getting value of id = 42114932, now i wish to match this value in the given array and wherever it matches, i wish to fetch the username, fullname and profile pic of that id, in this case corresponding to id 42114932 i wish to get
例如,我正在获得id = 42114932的值,现在我希望在给定数组中匹配此值以及它匹配的任何地方,我希望获取该id的用户名,全名和个人资料照片,在这种情况下对应于id 42114932我希望要得到
username=SD,
full_nmae=A
profile_pic = https://instagramimages-a.akamaihd.net/profiles/profile_4.jpg
if it is possible can anyone tell how it can be done
如果有可能,任何人都可以告诉它是如何做到的
5 个解决方案