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

From: Date: Tue, 07 Feb 2012 18:34:38 +0000
Subject: Re: How to detect languages from (=> LTR vs RTL)
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-316531@lists.php.net to get a copy of this message
On Tue, Feb 7, 2012 at 19:31, Dotan Cohen <dotancohen@gmail.com> 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

« previous php.general (#316531) next »