Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

array value search in php

function searchForId($id, $array) {
   foreach ($array as $key => $val) {
       if ($val['uid'] === $id) {
           return $key;
       }
   }
   return null;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #array #search #php
ADD COMMENT
Topic
Name
5+2 =