Answers for "array search key of value php on multidimensional"

PHP
1

PHP multidimensional array search by value

$key = array_search('100', array_column($userdb, 'uid'));
Posted by: Guest on August-10-2021
0

array search multidimensional php

function find_customer_mobile($customers, $mobile) {
    foreach($customers as $index => $cust) {
        if($cust['mobile'] == $mobile) return $index;
    }
    return FALSE;
}
Posted by: Guest on June-28-2021

Code answers related to "array search key of value php on multidimensional"

Browse Popular Code Answers by Language