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





 
Related Class Documentation

<?php
    $text 
= <<< END
    <p><b> Peace &nbsp; سلام &nbsp; 
    שלום &nbsp; Hasîtî &nbsp;
    शान्ति&nbsp; Barış &nbsp; 和平&nbsp; Мир 
    </b></p>
END;
    
    include(
'Arabic.php');
    
$Ar = new Arabic('ArIdentifier');
    
    
$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));
?>


Peace   سلام   שלום   Hasîtî   शान्ति  Barış  

(Khaled) is Arabic? bool(false)

(خالد) is Arabic? bool(true)

The probability of anything happeningis in inverse ratio to its desirability.
إحتمال حدوث أي شيء يرتبط عكسيا بدرجة الرغبة في حصوله
Index | Features | ArPHP Project | Useful Links | About Us | Download | PHP4!!!

Copyright © 2006 - 2010 Ar-PHP. All Rights Reserved | Sourceforge.net | Terms Of Use

 

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