Answers for "multidimensional array find value in php"

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 "multidimensional array find value in php"

Browse Popular Code Answers by Language