Test Ar-PHP Functionality Online

header line!
Test PHP Function










Ar-PHP Manual

static method isArabic [line 188]

static boolean isArabic( string $str)

Find out if given string is Arabic text or not



Tags:

return:  True if given string is UTF-8 Arabic, else will return False
author:  Khaled Al-Sham'aa <khaled@ar-php.org>
access:  public


Parameters:

string   $str   String

Example
  1.      include('./I18N/Arabic.php');
  2.      $obj new I18N_Arabic('Identifier');
  3.  
  4.      $hStr=$obj->highlightText($str'#80B020');
  5.  
  6.      echo $str '<hr />' $hStr '<hr />';
  7.  
  8.      $taggedText $obj->tagText($str);
  9.  
  10.      foreach($taggedText as $wordTag{
  11.          list($word$tag$wordTag;
  12.  
  13.          if ($tag == 1{
  14.              echo "$word is Noun, ";
  15.          }
  16.  
  17.          if ($tag == 0{
  18.              echo "$word is not Noun, ";
  19.          }
  20.      }
Popular
Recent
Links
Ads!
footer line!

No Software Patents! General Public License

Home | Twitter | Blog | Contact

Copyright © 2006 - 2016 Khaled Al-Sham'aa