<?php $array = array( array( 'type' => 'checkbox', 'id' => 'f0', 'is_active' => 1 ), array( 'type' => 'checkbox', 'id' => 'f1', 'is_active' => 0 ), array( 'type' => 'radio', 'id' => 'f2', 'is_active' => 0 ), array( 'type' => 'checkbox', 'id' => 'f3', 'is_active' => 1 ), array( 'type' => 'text', 'id' => 'f4', 'is_active' => 1 ) ); $filtered = array_filter($array, function($v){return $v['type'] == 'checkbox' && $v['is_active'] == 1;}); print_r($filtered);
You have javascript disabled. You will not be able to edit any code.