Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php count word arabic

if (!function_exists('mb_str_word_count'))
{
    function mb_str_word_count($string, $format = 0, $charlist = '[]') {
        $string=trim($string);
        if(empty($string))
            $words = array();
        else
            $words = preg_split('~[^p{L}p{N}']+~u',$string);
        switch ($format) {
            case 0:
                return count($words);
                break;
            case 1:
            case 2:
                return $words;
                break;
            default:
                return $words;
                break;
        }
    }
}
Comment

PREVIOUS NEXT
Code Example
Php :: php season calculation 
Php :: Ciclo for PHP ejemplos 
Php :: public function __sleep() and __wakeup() 
Php :: leaf php 
Php :: enfold remove debugging info for theme support 
Php :: PHPMailer/SMTP.php line 467 
Php :: overwrite existing key value pair php 
Php :: php unit testAdd Answer 
Php :: ultimo numeto php 
Php :: php move uploaded file 
Php :: login php 
Php :: php send data from one page to another 
Php :: html table to array php 
Php :: laravel query 
Php :: display picture in pdf generated with laravel 
Php :: Paginating API HTTP Response in Laravel 
Php :: how to grab shortcode from custom post type 
Php :: Syntax error or access violation: 1055 
Php :: setup PDO 
Java :: how to make phone vibrate android studio 
Java :: how to set current date in android studio 
Java :: jbutton set background transparent 
Java :: bootstrap center text vertically 
Java :: default structure of java 
Java :: javafx tableview remove clear all data 
Java :: filll 2d array in java 
Java :: java create a set with values 
Java :: java remove non numbers from string 
Java :: java chararray to int 
Java :: how to convert object to list in java 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =