PHP Programing language

R4R® PHP
(追記) (追記ここまで)
(追記) (追記ここまで)
array_key_exists() Function in PHP
(追記) (追記ここまで)
(追記) (追記ここまで)

array_key_exists()

The array_key_exists() function checks an array for a specified key, and returns true if the key exists and false if the key does not exist.

Syntax:
array_key_exists(key,array)

In above syntax,"key" specifies the key and "array" specifies an array

Example:

<?php
$a=array("Apple"=>"fruit","Mango");
if (array_key_exists("Mango",$a))
 {
 echo "Key exists!";
 }
else
 {
 echo "Key does not exist!";
 }
?>

Output:

Key does not exist!

(追記) (追記ここまで)
Copyright ©2021-22 r4r.co.in, all rights reserved. Theguestspost.com
Sitemap
Career
Post comment
About us
Subscription
Unsubscription

AltStyle によって変換されたページ (->オリジナル) /