Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

in_array Associative Array PHP

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

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

  echo 'exists';

}else{

  echo 'not exists';

}
Source by wlearnsmart.com #
 
PREVIOUS NEXT
Tagged: #Associative #Array #PHP
ADD COMMENT
Topic
Name
4+6 =