Test Ar-PHP Functionality Online
Test PHP Function
Sub Class:
- Select one -
AutoSummarize
CharsetD
CompressStr
Date
Gender
Glyphs
Hiero
Identifier
KeySwap
Mktime
Normalise
Numbers
Query
Salat
Sort
Soundex
Standard
Stemmer
StrToTime
Transliteration
WordTag
Method:
- Select one -
identify
isArabic
str:
Result (
var_dump
output):
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
include
(
'./I18N/Arabic.php'
)
;
$obj
=
new
I18N_Arabic
(
'Identifier'
)
;
$hStr
=
$obj
->
highlightText
(
$str
,
'#80B020'
)
;
echo
$str
.
'<hr />'
.
$hStr
.
'<hr />'
;
$taggedText
=
$obj
->
tagText
(
$str
)
;
foreach
(
$taggedText
as
$wordTag
)
{
list
(
$word
,
$tag
)
=
$wordTag
;
if
(
$tag
==
1
)
{
echo
"
$word
is Noun,
"
;
}
if
(
$tag
==
0
)
{
echo
"
$word
is not Noun,
"
;
}
}
Popular
utf8Glyphs
(1231)
ar2en
(980)
money2str
(553)
en2ar
(400)
isFemale
(291)
Recent
isArabic
(4 days)
ar2en
(7 days)
money2str
(19 days)
setFeminine
(19 days)
getOrderBy
(24 days)
Links
Homepage
Download
Bug Report
Feature Request
My Blog
My Twitter
Ads!
Home
|
Twitter
|
Blog
|
Contact
Copyright © 2006 - 2016 Khaled Al-Sham'aa