[Solved] Increase the speed of this code? Foreach

[ad_1]

Might be slightly faster, I haven’t tested, but if ['Data']['Show'] will be true or false then this is how I would do it:

$pass = array_filter($var, function($v) { return $v['Data']['Show']; });

If it could be other values that evaluate to false then:

$pass = array_filter($var, function($v) { return $v['Data']['Show'] !== false; });

[ad_2]

solved Increase the speed of this code? Foreach