Getting key from an array by value

if(in_array($data['question_type],$questionTypes)){
   $examTypeId = array_search($data['question_type'],$questionTypes);
}

Comments

Popular posts from this blog

WP register_post_type() with custom CMB2 meta box

Git post receive setup at server for git push to the production from local machine