$tmp = 0; foreach($result['response']['items'] as $post ) { if ($post['date'] <= $only_old_post_time ) { $tmp++; } } if (!$tmp){ $offset += 100; } How to write this piece of code more elegantly, correctly, so that it works faster, and the mb can be done like standard functions?
$tmp = count(array_filter(...- splash58