Answers for "associative array a value to check php"

PHP
1

php check array is not associative

count(array_filter(array_keys($array), 'is_string')) === 0
Posted by: Guest on September-03-2020
0

in_array Associative Array PHP

$arr = array('lang1' => 'php','lang2' => 'java','lang3' => 'python');

if ( in_array( 'java', $arr ) ) {

  echo 'exists';

}else{

  echo 'not exists';

}
Posted by: Guest on October-09-2021

Code answers related to "associative array a value to check php"

Browse Popular Code Answers by Language