in_array :php find in array
Posted by Raj
in_array :php find in array
PHP in_array is used to check if a value exists in an array
Syntax:
bool in_array($var,$arr)
Returns TRUE if $var exists in an array, FALSE otherwise.
Example:php find in array
<?php
$arr1 = array('A','B');
if(in_array('A',$arr1))
echo '`A` exists in an array'
else
echo 'Not Found';
?>
Output :
Array.
PHP in_array is used to check if a value exists in an array
Syntax:
bool in_array($var,$arr)
Returns TRUE if $var exists in an array, FALSE otherwise.
Example:php find in array
<?php
$arr1 = array('A','B');
if(in_array('A',$arr1))
echo '`A` exists in an array'
else
echo 'Not Found';
?>
Output :
Array.
This entry was posted on October 4, 2009 at 12:14 pm, and is filed under
in array php,
in_array php,
in_array php function,
php array,
php array element,
php find in array,
php in array,
php in_array,
php is in array
.You can leave a response, or trackback from your own site.