<?php
$userdb = [
[
'100',
'Sandra',
'urlof100'
],
[ '5465',
'Stefanie',
'urlof5465'
],
[ '40489',
'Michael',
'urlof40489'
]
];
function getRow($find,$db,$col){
$key = array_search($find, array_column($db, $col));
if ($key !== false) {
echo "Yes, \"$find\" is in array in row $key\n";
}
return $db[$key];
}
$row = getRow('Sandra',$userdb,1);
print_r($row);
preferences:
29.61 ms | 402 KiB | 5 Q