Question: I am confused about what is business logic. I assume that it is written in Controller but then I search it on internet but i found that many person say that it refers to model. I am highly confused. And somee community meembers give me suggestions that my question is same but you are doing mistake. I am confused by the answers in those questions. Someone says model is business logic but I assume that Controller is business logic. So Please understand my doubt.

Answer: 
You can use `array_filter` with `callback` to return only type which is checkbox.

```
$filtered = array_filter($array, function($v){return $v['type'] == 'checkbox' && $v['is_active'] == 1;});

```

Working example :- <https://3v4l.org/idAR4>
Edit of answer @Rakesh Jakhar

One more condition added as per the question

```
<?php
// Your code here!
$actions = 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
    ),
    array(
        'type'      => 'checkbox',
        'id'        => 'f5',
        'is_active' => 0
    ),
    array(
        'type'      => 'checkbox',
        'id'        => 'f6',
        'is_active' => 1
    )
);

$filtered = array_filter($actions, function($v){return $v['type'] == 'checkbox' && $v['is_active']==1 ;});
print_r($filtered);
?>

```