<?php $userdb = [ [ 'uid' => [ ['10770'], ['523465'], ['4042389'] ], 'name' => 'Sandra Shush', 'url' => 'urlof100' ], [ 'uid' => [ ['102320'], ['532465'], ['40432389'] ], 'name' => 'Stefanie Mcmohn', 'pic_square' => 'urlof100' ] ]; $find = '523465'; $key = null; foreach ($userdb as $index => ['uid' => $uids]) { if (in_array([$find], $uids)) { $key = $index; break; } } echo $key ?? 'not found';
You have javascript disabled. You will not be able to edit any code.