Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
Check if the key "Volvo" exists in an array:
SUBMITTED BY:
henry1874w
DATE:
June 23, 2017, 9:37 p.m.
FORMAT:
Text only
SIZE:
164 Bytes
Raw
Download
Tweet
HITS:
324
Go to comments
Report
<?php
$a=array("Volvo"=>"XC90","BMW"=>"X5");
if (array_key_exists("Volvo",$a))
{
echo "Key exists!";
}
else
{
echo "Key does not exist!";
}
?>
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus