Re: How to detect languages from (=> LTR vs RTL)

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

 



On Tue, Feb 7, 2012 at 19:31, Dotan Cohen <dotancohen@xxxxxxxxx> wrote:
> function is_strong($char) {
>    if (  in_array($char, $arrayOfRtlCharacters)  ) {
>        return "RTL";
>    }
>    if (  in_array($char, $arrayOfLtrCharacters)  ) {
>        return "LTR";
>    }
>    return FALSE;
> }
>

On second thought, you might want to try preg_match() instead of
in_array() to use character ranges.


-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux