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





 
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)

Eat one live toad the first thing in the morning and nothing worse will happen to you the rest of the day.
تناول ضفدع حي في الصباح، ولن تصادف ما هو أسوء طيلة ذلك اليوم
Index | Features | ArPHP Project | Useful Links | About Us | Download | PHP4!!!

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

 

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