Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
Search an array for the value "red" and return its key:
SUBMITTED BY:
henry1874w
DATE:
June 25, 2017, 2:48 p.m.
FORMAT:
Text only
SIZE:
87 Bytes
Raw
Download
Tweet
HITS:
292
Go to comments
Report
<?php
$a=array("a"=>"red","b"=>"green","c"=>"blue");
echo array_search("red",$a);
?>
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus