parameter being lossed when passed to array_filter
<pre><code>    foreach( $items as $item) {
    $taskid = (int) $goal['goal_id'];
    $items[$i]['tasks'] = array();
    $items[$i]['tasks'] = array_filter($tasks, function($task, $taskid){    
    return $task['task_id'] == $taskid;
    });
</code></pre>

<p>Why is $taskid not being passed to the array_filter function, it returns null if echoed from within but if echoed just after it is set it gives the correct value e.g.</p>

<pre><code>    foreach( $items as $item) {
    $taskid = (int) $goal['goal_id'];
    echo $taskid;
</code></pre>

<p>Will return whatever the integer is</p>

<p>The return part of the function also works if I manually set a value i.e</p>

<pre><code>    return $task['task_id'] == 2;
</code></pre>

<p>Guidance appreciated</p>
