Oct 16, 2016
0
Level 1
Date
Hello How can use this function to convert date after insert database from( 2016-10-15 08:09:00 - TO - أكتوبر 16 2016)
public static function getArabicMonth($data) { $months = [ "Jan" => "يناير", "Feb" => "فبراير", "Mar" => "مارس", "Apr" => "أبريل", "May" => "مايو", "Jun" => "يونيو", "Jul" => "يوليو", "Aug" => "أغسطس", "Sep" => "سبتمبر", "Oct" => "أكتوبر", "Nov" => "نوفمبر", "Dec" => "ديسمبر" ];
$day = date("d", strtotime($data));
$month = date("M", strtotime($data));
$year = date("Y", strtotime($data));
$month = $months[$month];
return $day . ' ' . $month . ' ' . $year;
}
Please or to participate in this conversation.