Skip to content

Instantly share code, notes, and snippets.

@iRynoh
Created February 12, 2019 19:47
Show Gist options
  • Save iRynoh/55822b0352c762bebf49ce93f44ae7fe to your computer and use it in GitHub Desktop.
Save iRynoh/55822b0352c762bebf49ce93f44ae7fe to your computer and use it in GitHub Desktop.
answer #1
<?php
$newData = array_filter($data, function ($value) {
$monthNumber = DateTime::createFromFormat('Y-m-d', $value->created_at)->format('n');
return $monthNumber === '7';
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment