For example my month number is (3
= Mar) Or (2
= Feb), i tryed as following code, but it doesn't work. How fix it?
$month = 2;
echo date('M', strtotime($month));
For example my month number is (3
= Mar) Or (2
= Feb), i tryed as following code, but it doesn't work. How fix it?
$month = 2;
echo date('M', strtotime($month));
Based on your code:
$month = 2;
echo date('M', strtotime('2012-' . $month . '-01'));
strtotime()
accepts date not just month