I have the following date: 2010-04-19 .
I would like to convert this date strtotime format and convert "Y-m" format.
Example = "2018-5"
my code:
$date1= 'onlinearticles_'.$date;
$article_table= date('Y-m',strtotime($date1));
But it didin't work, how can I do this ?