Search an array for the value 5 and return its key (notice the ""):


SUBMITTED BY: henry1874w

DATE: June 25, 2017, 2:48 p.m.

FORMAT: Text only

SIZE: 77 Bytes

HITS: 282

  1. <?php
  2. $a=array("a"=>"5","b"=>5,"c"=>"5");
  3. echo array_search(5,$a,true);
  4. ?>

comments powered by Disqus