I have a variable with the following value
$month = 201002;
the first 4 numbers represent the year, and the last 2 numbers represent the month. I need to get the last 2 numbers in the month string name, for example. February
My code is as follows
<?php echo date('M',substr($month,4,6)); ?>
I can get the name of the month
php
Rolling
source share