Re: Re: Date in arabic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear All,

I think this is an easier solution:
<?php
// array containing all arabic months
$ar_month = array('íäÇíÑ', 'ÝÈÑÇíÑ', 'ãÇÑÓ', 'ÃÈÑíá', 'ãÇíæ', 'íæäíæ', 'íæáíæ', 'ÃÛÓØÓ', 'ÓÈÊãÈÑ', 'ÃßÊæÈÑ', 'äæÝãÈÑ', 'ÏíÓãÈÑ');
// get current month and substract 1 to match array position
$arabic_month = $ar_month[date('m')-1];

// will display current arabic month
echo $arabic_month;
?>

Regards,
Joseph Griffin
http://www.aspiredmind.com/



________________________________
From: SaEeDoS <saeedos@xxxxxxxxx>
To: php-objects@xxxxxxxxxxxxxxx
Sent: Tuesday, February 17, 2009 6:47:32 PM
Subject:  Re: Date in arabic


i'm using this function :
<?php
$todayMonth= date("M", time());
$monthNames= monthName( $todayMonth) ;

function arabicMonthNames( $date)
{
switch ($date)
{
case 01:
return $monthNames= "&#1610;& #1606;&#1575; &#1610;&# 1585;";
break;
case 02:
return $monthNames= "&#1601;& #1576;&#1585; &#1575;&# 1610;&#1585; "; 
break;
case 03:
return $monthNames= "&#1605;& #1575;&#1585; &#1587;"; 
break;
case 04:
return $monthNames= "&#1573;& #1576;&#1585; &#1610;&# 1604;"; 
break;
case 05:
return $monthNames= "&#1605;& #1575;&#1610; &#1608;"; 
break;
case 06:
return $monthNames= "&#1610;& #1608;&#1606; &#1610;&# 1608;"; 
break;
case 07:
return $monthNames= "&#1610;& #1608;&#1604; &#1610;&# 1608;"; 
break;
case 08:
return $monthNames= "&#1571;& #1594;&#1587; &#1591;&# 1587;"; 
break;
case 09:
return $monthNames= "&#1587;& #1576;&#1578; &#1605;&# 1576;&#1585; "; 
break;
case 10:
return $monthNames= "&#1571;& #1603;&#1578; &#1608;&# 1576;&#1585; "; 
break;
case 11:
return $monthNames= "&#1606;& #1608;&#1601; &#1605;&# 1576;&#1585; "; 
break;
case 12:
return $monthNames= "&#1583;& #1610;&#1587; &#1605;&# 1576;&#1585; "; 
break; 
}
}
?>

i hope it can be useful

--- In php-objects@ yahoogroups. com, Mohammad Al-Naji <mnaji.qx@.. .> 
wrote:
>
> do you have any idea how to write the date in arabic char like 
[&#1603;&#1575; &#1606;&# 1608;&#1606; &#1579;&#1575; &#1606;&# 1610;]?
> 
> -- 
> Kind Regards,
> Mohammad Al-Naji
> 
> 
> [Non-text portions of this message have been removed]
>




[Non-text portions of this message have been removed]



------------------------------------

Are you looking for a PHP job?
Join the PHP Professionals directory Now!
http://www.phpclasses.org/jobs/
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-objects/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/php-objects/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:php-objects-digest@xxxxxxxxxxxxxxx 
    mailto:php-objects-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    php-objects-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux