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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.