الصفحة الرئيسية
المزايا
المشروع
روابط مفيدة
تنزيل
الأسئلة الشائعة
النسخة القديمة
Related Class Documentation

<?php
    $text 
= <<< END
    <p><b> Peace سلام  
    שלום Hasîtî 
    शान्ति Barış  和平 Мир
    </b></p>
END;
    
    require(
'I18N/Arabic.php');
    
$Ar = new I18N_Arabic('Identifier');
    
    
$pos $Ar->identify($text);
    
    
$total count($pos);
    
    echo 
substr($text0$pos[0]);
    
    for(
$i=0$i<$total$i+=2){
        echo 
'<font color="#FFFF00">';
        echo 
substr($text$pos[$i], 
                    
$pos[$i+1]-$pos[$i]);
        echo 
'</font>';
        echo 
substr($text$pos[$i+1], 
                    
$pos[$i+2]-$pos[$i+1]);
    }
    
    
$word 'Khaled';
    echo 
"<br /><br />($word) is Arabic? ";
    
var_dump($Ar->isArabic($word));
    
    
$word 'خالد';
    echo 
"<br /><br />($word) is Arabic? ";
    
var_dump($Ar->isArabic($word));
?>




(Khaled) is Arabic? string(0) ""

(خالد) is Arabic? string(1) "1"
When all else fails, read the directions.
عندما يفشل كل شيء آخر، إقرأ التعليمات
Index | Features | ArPHP Project | Useful Links | Download | PHP4!!!

Copyright © 2006 - 2021 Khaled Al-Sham'aa. All Rights Reserved | Sourceforge.net | GitHub.com | Terms Of Use

 

  If not now when? If not you and me who else? | إن لم يكن الآن فمتى؟ إن لم تكن أنت وأنا فمن غيرنا؟