How to remove English names from when Arabic language is selected for site

Hi, I am using open source code from phpGedView for our family website. We have two languages enabled on the site and one of the blocks on the main page displays the top 10 surnames from the family tree. The thing is that we want to change it (for now) to show only Arabic names on the Arabic site and English names on the English site since we don't have all family names translated yet. I cannot figure out how to do this. See code in attached file for the whole block. I tried using ctype and added this section below. The text direction detection work but the rest of the code is giving me an error (below)

added code:
// Remove English Names on Arabic page list - Added By me requested by family
           if ($TEXT_DIRECTION == "rtl") {
             foreach ($all_surnames as $surname) {
                  if (ctype_alpha(UTF8_strtoupper($surname))) {
                  //     unset($all_surnames[UTF8_strtoupper($indsurname)]);
                  }
             }
          }


Error:
ERROR 2: Illegal offset type in isset or empty
0 Error occurred on line 229 of file functions_UTF8.php in function UTF8_strtoupper
1 called from line 108 of file top10_surnames.php in function print_block_name_top10
2 called from line 1 of file index.php(276) : eval()'d code in function eval
3 called from line 276 of file index.phpcode.rtfcode.rtfcode.rtf
SamooramadAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ray PaseurCommented:
I'll take a closer look at this in a few moments, but for right now, please let me suggest a design pattern that is often used by multi-language sites.  It's described and demonstrated in this article.  You can avoid all of the programmatic translation difficulties and work in native languages if you use such a design because the different languages are decoupled from each other.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_8910-A-Polyglot-Web-Site-in-PHP.html
Ray PaseurCommented:
OK, I've looked at this a little more.  The application you're using is very, very old.  Its last stable release is four years old and development status is listed as "stalled."
https://en.wikipedia.org/wiki/PhpGedView

What that means from a practical standpoint is that you would either want to discard this platform and choose modern software, or accept the fact that you'll probably be the only one (or at most one of a very few, worldwide) working on this project.  And that means you will need to know enough PHP to write, modify, refactor, and test these scripts.  Unfortunately, as written, the PHP code is untestable with modern technologies.

I can probably help in two ways.  First, I can show you how to find the learning resources you need to get up-to-speed in PHP.  This article will get you going with links to dependable examples and tutorials.  If you find it goes into computer science topics you already know, just skip over those and move on.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_11769-And-by-the-way-I-am-new-to-PHP.html

Second, in software development there is a concept we use called the SSCCE.  In the instant case the SSCCE would not have any PHP code at all - it would consist solely of a small UTF-8 document showing us a representative collection of corresponding English and Arabic names.  We can use this information to create a "discrimination" engine that will help us identify which language is in use.

The issue of language detection and LTR vs RTL display is handled well by WordPress.  You might want to learn a little more about how they do it.  I know that it is wise to detect those requirements before any HTML is produced, since it typically needs to be present at the top of the HTML document, something like this:
<!DOCTYPE html>
<html dir="ltr" lang="en-US">
<head>
<meta charset="utf-8" /> /* etc, etc... */

Open in new window

SamooramadAuthor Commented:
I realize it is old but I couldn't find anything available that did what we needed, was open source and supported Unicode like this website. Its features are fantastic so we made the call to use it for now as the changes we make will be minor. If you can suggest a way to fix my problem using the existing code, I'd be grateful. Thanks
CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

Ray PaseurCommented:
Need some test data, please.
Second, in software development there is a concept we use called the SSCCE.  In the instant case the SSCCE would not have any PHP code at all - it would consist solely of a small UTF-8 document showing us a representative collection of corresponding English and Arabic names.  We can use this information to create a "discrimination" engine that will help us identify which language is in use.
SamooramadAuthor Commented:
This is the table that is currently listed on the Arabic page(3 columns: one is row number, one is family name, one is number of members in each family) with the total on the bottom. Thanks!:

      إسم العائلة                    الأفراد
1      القدهي                       259
2      العجروش                     219
3      الحمدان                          90
4      75                            Thomas
5      العمري                             66
6      64                     Madrid
7      57                     Majnik
8      اسماعيل                       39
9      39                      Banner
10      الدبيان                             39
       إجمالي عدد الأفراد:         947
Ray PaseurCommented:
Great - I'll see what I can show you from that data sample.  It may take me a bit of work, but there is nothing better than good test data!
Ray PaseurCommented:
I have to do a bit of normalization to reformat this information because my text editor doesn't seem to be able to handle Arabic, but that should not stand in the way of identifying the Arabic in a PHP script.  This is what I'll be working with.  There are three elements in each row, the third is either Arabic or not.  We will use character set detection to determine which is which.
    [3] => 1 القدهي 259
    [4] => 2 العجروش 219
    [5] => 3 الحمدان 90
    [6] => 4 75 Thomas
    [7] => 5 العمري 66
    [8] => 6 64 Madrid
    [9] => 7 57 Majnik
    [10] => 8 اسماعيل 39
    [11] => 9 39 Banner
    [12] => 10 الدبيان 39

Open in new window

Ray PaseurCommented:
Please see: http://iconoun.com/demo/temp_samoor.php

There are comments throughout.  Most of the script is about isolating the name.  The detection of Arabic vs Western is done on line 90.
<?php // demo/temp_samoor.php
/**
 * http://www.experts-exchange.com/questions/28712997/How-to-remove-English-names-from-when-Arabic-language-is-selected-for-site.html#a40973786
 *
 * http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_11880-Unicode-PHP-and-Character-Collisions.html
 *
 * http://php.net/manual/en/refs.international.php
 * http://php.net/manual/en/book.mbstring.php
 * http://php.net/manual/en/function.mb-internal-encoding.php
 * http://php.net/manual/en/function.mb-regex-encoding.php
 * http://php.net/manual/en/function.mb-detect-encoding.php
 *
 * http://php.net/manual/en/function.mb-ereg.php#110659
 */
error_reporting(E_ALL);

// SET ENCODING FOR PHP AND HTML
mb_internal_encoding('UTF-8');
mb_regex_encoding('UTF-8');
echo '<meta charset="utf-8" />';

// URL OF THE COPIED WEB PAGE
$url = 'temp_samoor.htm';

// SIGNAL STRING TO ISOLATE THE INFORMATION
$sig = 'This is the table that is currently listed on the Arabic page';

// ISOLATE THE ARABIC CONTENT
$htm = file_get_contents($url);
$arr = explode($sig, $htm);
$htm = $arr[1];
$arr = explode('</div>', $htm);
$htm = $arr[0];
$arr = explode('<br />', $htm);
unset($arr[0], $arr[1], $arr[2], $arr[13]);

// NORMALIZE THE DATA
foreach ($arr as $key => $str)
{
    $str = str_replace('&nbsp;', ' ', $str);
    $str = preg_replace('/\s\s+/', ' ', $str);
    $str = trim($str);
    $arr[$key] = $str;
}

/**
 * Process each row to isolate the Western or Arabic data elements
 *
 * This seems to be a PHP-related oddity!
 * If you use explode(' ') to deconstruct the string, the LTR or RTL direction
 * affects the order of elements in the array that is returned by the function.
 *
 * English rows will be Number, Number, NAME
 * Arabic rows will be  Number, NAME,   Number
 */
$pik = [];
foreach ($arr as $str)
{
   $dat = explode(' ', $str);

   // IF THE LAST ELEMENT IS A NUMBER, THERE IS ARABIC IN THE SECOND ELEMENT
   if (preg_match('#[0-9]#', $dat[2]))
   {
       $pik[] = $dat[1];
   }
   else $pik[] = $dat[2];

}
/**
 * At this point, $pik is an array with either Arabic or Western character strings
 * Looks something like this
 *  [0] => ??????
 *  [1] => ???????
 *  [2] => ???????
 *  [3] => Thomas
 *  [4] => ??????
 *  [5] => Madrid
 *  [6] => Majnik
 *  [7] => ???????
 *  [8] => Banner
 *  [9] => ???????
 */
echo '<pre>';

// TEST EACH STRING
foreach ($pik as $str)
{
    // ASSUME WESTERN AND TEST FOR ARABIC RANGE
    $tag = 'Western:';
    if(mb_ereg('[\x{0600}-\x{06FF}]', $str)) $tag = 'Arabic:';

    // SHOW THE STRING AND THE DETECTED LANGUAGE
    echo PHP_EOL;
    echo "$tag $str";

    // SHOW THE DECONSTRUCTED STRING IN CHARACTER AND HEX NOTATION
    echo PHP_EOL;
    $hex = new Hexdump($str);
    $hex->render();
    echo PHP_EOL;
}

/**
 * Classes to provide a neatly formatted character and hex representation of a string
 */
Class Letter
{
    public function __construct($chr)
    {
        $this->chr = $chr;
        $this->hex = array();
        $bytes     = $this->usplit($chr);
        foreach ($bytes as $byte)
        {
            $this->hex = array_merge($this->hex, $this->gethex($byte));
        }
        return $this;
    }

    public function usplit ($chr)
    {
        $len = strlen($chr);
        while ($len) {
            $arr[] = substr($chr, 0, 1);
            $chr   = substr($chr, 1, $len);
            $len   = strlen($chr);
        }
        return $arr;
    }

    public function gethex($chr)
    {
        // GET THE HEX NIBBLE VALUES IN AN ARRAY
        $ret = str_split(implode(NULL, unpack('H*', $chr)));
        return $ret;
    }
}

Class Hexdump
{
    public function __construct($str)
    {
        $this->str = $str;
        $this->arr = $this->mb_str_split($str);
        $this->len = mb_strlen($str);
        foreach ($this->arr as $uchr)
        {
            $this->dat[] = new Letter($uchr);
        }
        return $this;
    }

    public function mb_str_split($ustr)
    {
        return preg_split('/(?<!^)(?!$)/u', $ustr);
    }

    public function render($br = PHP_EOL)
    {
        foreach ($this->dat as $poz => $chr)
        {
            echo $br;
            echo str_pad($poz, 4, ' ', STR_PAD_LEFT);
            echo ' ';
            echo $chr->chr;
            echo "\t";
            echo implode(null, $chr->hex);
        }
        echo $br;
    }
}

Open in new window

Best regards, ~Ray
SamooramadAuthor Commented:
Thanks. So I got this error when I tried to use mb_ereg while looping through the surnames in my code:

ERROR 2: mb_ereg() expects parameter 2 to be string, array given
0 Error occurred on in function mb_ereg

how do I convert my array of surnames into string to use in mb_ereg()?
Ray PaseurCommented:
An array is an aggregate data form.  It is a "set" which may contain almost any kind of subsets - strings, objects, more arrays, etc.  You can look at the array and discern its contents with var_dump().

Arrays are not "converted" into strings, but each element of the array can be addressed individually.  That is what the foreach() iterator does.  Please see the comment on line 85 and the line of code on line 86.

From this and your other questions, it looks like you may be new to PHP.  If you are new to PHP, and you want to learn the language, this article will help you get a firm footing - just skip over the basic computer science parts that you already know.  But it takes a while to learn any programming language, and if you need immediate results it might be worth hiring a professional developer or joining a local PHP user group to get some "hands-on" help.
SamooramadAuthor Commented:
I know what an array is and I am looping through it. Did you see my code? But even as I loop through it, it is not recognizing the elements as string. That's why I was asking how do I convert this to string since I don't know the command to use in PHP. I am assuming it is seeing these elements as some other object.

if ($TEXT_DIRECTION == "rtl") {
             foreach ($all_surnames as $surname) {
                  if (!mb_ereg('[\x{0600}-\x{06FF}]', $surname)) $title = "names";
                  //     unset($all_surnames[UTF8_strtoupper($indsurname)]);
             }
          }
Ray PaseurCommented:
... asking how do I convert this to string ...
The key word here is this.  We have a data-dependent problem, and to solve such problems we need to see the data.  You can look at the data and discern its contents with var_dump().  If you can post the output from var_dump($surname) we may be able to offer some suggestions about what programming might make sense.
SamooramadAuthor Commented:
Yikes! This is what showed up as a result of var_dump:

array(10) { ["القدهي"]=> array(1) { ["القدهي"]=> array(259) { ["I13"]=> bool(true) ["I2845"]=> bool(true) ["I24"]=> bool(true) ["I2877"]=> bool(true) ["I2709"]=> bool(true) ["I368"]=> bool(true) ["I2742"]=> bool(true) ["I59"]=> bool(true) ["I147"]=> bool(true) ["I2856"]=> bool(true) ["I2559"]=> bool(true) ["I2888"]=> bool(true) ["I2720"]=> bool(true) ["I38"]=> bool(true) ["I2824"]=> bool(true) ["I70"]=> bool(true) ["I2835"]=> bool(true) ["I930"]=> bool(true) ["I199"]=> bool(true) ["I2867"]=> bool(true) ["I2674"]=> bool(true) ["I2900"]=> bool(true) ["I2732"]=> bool(true) ["I391"]=> bool(true) ["I136"]=> bool(true) ["I2846"]=> bool(true) ["I2442"]=> bool(true) ["I2878"]=> bool(true) ["I2710"]=> bool(true) ["I369"]=> bool(true) ["I2743"]=> bool(true) ["I60"]=> bool(true) ["I148"]=> bool(true) ["I2857"]=> bool(true) ["I2560"]=> bool(true) ["I2889"]=> bool(true) ["I2721"]=> bool(true) ["I380"]=> bool(true) ["I2825"]=> bool(true) ["I71"]=> bool(true) ["I2836"]=> bool(true) ["I931"]=> bool(true) ["I2"]=> bool(true) ["I2868"]=> bool(true) ["I2675"]=> bool(true) ["I2912"]=> bool(true) ["I2733"]=> bool(true) ["I392"]=> bool(true) ["I138"]=> bool(true) ["I2847"]=> bool(true) ["I2447"]=> bool(true) ["I2879"]=> bool(true) ["I2711"]=> bool(true) ["I370"]=> bool(true) ["I2744"]=> bool(true) ["I61"]=> bool(true) ["I15"]=> bool(true) ["I2858"]=> bool(true) ["I2561"]=> bool(true) ["I2890"]=> bool(true) ["I2722"]=> bool(true) ["I381"]=> bool(true) ["I2826"]=> bool(true) ["I72"]=> bool(true) ["I2837"]=> bool(true) ["I932"]=> bool(true) ["I20"]=> bool(true) ["I2869"]=> bool(true) ["I2676"]=> bool(true) ["I2913"]=> bool(true) ["I2734"]=> bool(true) ["I393"]=> bool(true) ["I139"]=> bool(true) ["I2848"]=> bool(true) ["I2550"]=> bool(true) ["I2880"]=> bool(true) ["I2712"]=> bool(true) ["I371"]=> bool(true) ["I2746"]=> bool(true) ["I62"]=> bool(true) ["I16"]=> bool(true) ["I2859"]=> bool(true) ["I2562"]=> bool(true) ["I2891"]=> bool(true) ["I2723"]=> bool(true) ["I382"]=> bool(true) ["I2827"]=> bool(true) ["I73"]=> bool(true) ["I2838"]=> bool(true) ["I945"]=> bool(true) ["I200"]=> bool(true) ["I2870"]=> bool(true) ["I2677"]=> bool(true) ["I2914"]=> bool(true) ["I2735"]=> bool(true) ["I52"]=> bool(true) ["I14"]=> bool(true) ["I2849"]=> bool(true) ["I2551"]=> bool(true) ["I2881"]=> bool(true) ["I2713"]=> bool(true) ["I372"]=> bool(true) ["I2748"]=> bool(true) ["I63"]=> bool(true) ["I167"]=> bool(true) ["I2860"]=> bool(true) ["I2563"]=> bool(true) ["I2892"]=> bool(true) ["I2724"]=> bool(true) ["I383"]=> bool(true) ["I2828"]=> bool(true) ["I74"]=> bool(true) ["I2839"]=> bool(true) ["I946"]=> bool(true) ["I201"]=> bool(true) ["I2871"]=> bool(true) ["I2678"]=> bool(true) ["I32"]=> bool(true) ["I2736"]=> bool(true) ["I53"]=> bool(true) ["I1"]=> bool(true) ["I140"]=> bool(true) ["I2850"]=> bool(true) ["I2552"]=> bool(true) ["I2882"]=> bool(true) ["I2714"]=> bool(true) ["I373"]=> bool(true) ["I2818"]=> bool(true) ["I64"]=> bool(true) ["I75"]=> bool(true) ["I168"]=> bool(true) ["I2861"]=> bool(true) ["I2571"]=> bool(true) ["I2893"]=> bool(true) ["I2725"]=> bool(true) ["I385"]=> bool(true) ["I2829"]=> bool(true) ["I2840"]=> bool(true) ["I947"]=> bool(true) ["I202"]=> bool(true) ["I2872"]=> bool(true) ["I2694"]=> bool(true) ["I350"]=> bool(true) ["I2737"]=> bool(true) ["I54"]=> bool(true) ["I101"]=> bool(true) ["I141"]=> bool(true) ["I2851"]=> bool(true) ["I2553"]=> bool(true) ["I2883"]=> bool(true) ["I2715"]=> bool(true) ["I374"]=> bool(true) ["I2819"]=> bool(true) ["I65"]=> bool(true) ["I77"]=> bool(true) ["I169"]=> bool(true) ["I2862"]=> bool(true) ["I261"]=> bool(true) ["I2894"]=> bool(true) ["I2726"]=> bool(true) ["I386"]=> bool(true) ["I2830"]=> bool(true) ["I102"]=> bool(true) ["I2841"]=> bool(true) ["I968"]=> bool(true) ["I21"]=> bool(true) ["I2873"]=> bool(true) ["I2695"]=> bool(true) ["I351"]=> bool(true) ["I2738"]=> bool(true) ["I55"]=> bool(true) ["I142"]=> bool(true) ["I2852"]=> bool(true) ["I2554"]=> bool(true) ["I2884"]=> bool(true) ["I2716"]=> bool(true) ["I375"]=> bool(true) ["I2820"]=> bool(true) ["I66"]=> bool(true) ["I921"]=> bool(true) ["I17"]=> bool(true) ["I2863"]=> bool(true) ["I2666"]=> bool(true) ["I2895"]=> bool(true) ["I2728"]=> bool(true) ["I387"]=> bool(true) ["I2831"]=> bool(true) ["I11"]=> bool(true) ["I2842"]=> bool(true) ["I22"]=> bool(true) ["I2874"]=> bool(true) ["I2696"]=> bool(true) ["I365"]=> bool(true) ["I2739"]=> bool(true) ["I56"]=> bool(true) ["I143"]=> bool(true) ["I2853"]=> bool(true) ["I2556"]=> bool(true) ["I2885"]=> bool(true) ["I2717"]=> bool(true) ["I376"]=> bool(true) ["I2821"]=> bool(true) ["I67"]=> bool(true) ["I924"]=> bool(true) ["I172"]=> bool(true) ["I2864"]=> bool(true) ["I2667"]=> bool(true) ["I2896"]=> bool(true) ["I2729"]=> bool(true) ["I388"]=> bool(true) ["I2832"]=> bool(true) ["I115"]=> bool(true) ["I2843"]=> bool(true) ["I224"]=> bool(true) ["I2875"]=> bool(true) ["I2697"]=> bool(true) ["I366"]=> bool(true) ["I2740"]=> bool(true) ["I57"]=> bool(true) ["I144"]=> bool(true) ["I2854"]=> bool(true) ["I2557"]=> bool(true) ["I2886"]=> bool(true) ["I2718"]=> bool(true) ["I377"]=> bool(true) ["I2822"]=> bool(true) ["I68"]=> bool(true) ["I925"]=> bool(true) ["I181"]=> bool(true) ["I2865"]=> bool(true) ["I2668"]=> bool(true) ["I2898"]=> bool(true) ["I2730"]=> bool(true) ["I389"]=> bool(true) ["I2833"]=> bool(true) ["I12"]=> bool(true) ["I2844"]=> bool(true) ["I23"]=> bool(true) ["I2876"]=> bool(true) ["I2698"]=> bool(true) ["I367"]=> bool(true) ["I2741"]=> bool(true) ["I58"]=> bool(true) ["I146"]=> bool(true) ["I2855"]=> bool(true) ["I2558"]=> bool(true) ["I2887"]=> bool(true) ["I2719"]=> bool(true) ["I378"]=> bool(true) ["I2823"]=> bool(true) ["I7"]=> bool(true) ["I927"]=> bool(true) ["I19"]=> bool(true) ["I2866"]=> bool(true) ["I2672"]=> bool(true) ["I2899"]=> bool(true) ["I2731"]=> bool(true) ["I390"]=> bool(true) ["I2834"]=> bool(true) } } ["العجروش"]=> array(1) { ["العجروش"]=> array(219) { ["I2479"]=> bool(true) ["I729"]=> bool(true) ["I549"]=> bool(true) ["I826"]=> bool(true) ["I582"]=> bool(true) ["I857"]=> bool(true) ["I675"]=> bool(true) ["I41"]=> bool(true) ["I748"]=> bool(true) ["I561"]=> bool(true) ["I837"]=> bool(true) ["I595"]=> bool(true) ["I874"]=> bool(true) ["I692"]=> bool(true) ["I713"]=> bool(true) ["I538"]=> bool(true) ["I815"]=> bool(true) ["I572"]=> bool(true) ["I848"]=> bool(true) ["I614"]=> bool(true) ["I2494"]=> bool(true) ["I730"]=> bool(true) ["I550"]=> bool(true) ["I827"]=> bool(true) ["I583"]=> bool(true) ["I858"]=> bool(true) ["I676"]=> bool(true) ["I42"]=> bool(true) ["I790"]=> bool(true) ["I562"]=> bool(true) ["I838"]=> bool(true) ["I596"]=> bool(true) ["I88"]=> bool(true) ["I697"]=> bool(true) ["I714"]=> bool(true) ["I539"]=> bool(true) ["I816"]=> bool(true) ["I573"]=> bool(true) ["I849"]=> bool(true) ["I615"]=> bool(true) ["I263"]=> bool(true) ["I735"]=> bool(true) ["I551"]=> bool(true) ["I828"]=> bool(true) ["I584"]=> bool(true) ["I859"]=> bool(true) ["I677"]=> bool(true) ["I43"]=> bool(true) ["I806"]=> bool(true) ["I563"]=> bool(true) ["I839"]=> bool(true) ["I597"]=> bool(true) ["I89"]=> bool(true) ["I700"]=> bool(true) ["I715"]=> bool(true) ["I540"]=> bool(true) ["I817"]=> bool(true) ["I574"]=> bool(true) ["I85"]=> bool(true) ["I616"]=> bool(true) ["I264"]=> bool(true) ["I736"]=> bool(true) ["I552"]=> bool(true) ["I829"]=> bool(true) ["I587"]=> bool(true) ["I860"]=> bool(true) ["I679"]=> bool(true) ["I528"]=> bool(true) ["I807"]=> bool(true) ["I564"]=> bool(true) ["I840"]=> bool(true) ["I598"]=> bool(true) ["I91"]=> bool(true) ["I701"]=> bool(true) ["I718"]=> bool(true) ["I542"]=> bool(true) ["I818"]=> bool(true) ["I575"]=> bool(true) ["I850"]=> bool(true) ["I630"]=> bool(true) ["I2640"]=> bool(true) ["I737"]=> bool(true) ["I553"]=> bool(true) ["I830"]=> bool(true) ["I588"]=> bool(true) ["I861"]=> bool(true) ["I680"]=> bool(true) ["I529"]=> bool(true) ["I808"]=> bool(true) ["I565"]=> bool(true) ["I841"]=> bool(true) ["I599"]=> bool(true) ["I92"]=> bool(true) ["I702"]=> bool(true) ["I723"]=> bool(true) ["I543"]=> bool(true) ["I819"]=> bool(true) ["I576"]=> bool(true) ["I851"]=> bool(true) ["I631"]=> bool(true) ["I100"]=> bool(true) ["I265"]=> bool(true) ["I738"]=> bool(true) ["I554"]=> bool(true) ["I831"]=> bool(true) ["I589"]=> bool(true) ["I862"]=> bool(true) ["I682"]=> bool(true) ["I531"]=> bool(true) ["I809"]=> bool(true) ["I566"]=> bool(true) ["I842"]=> bool(true) ["I6"]=> bool(true) ["I93"]=> bool(true) ["I703"]=> bool(true) ["I724"]=> bool(true) ["I544"]=> bool(true) ["I821"]=> bool(true) ["I577"]=> bool(true) ["I852"]=> bool(true) ["I665"]=> bool(true) ["I110"]=> bool(true) ["I278"]=> bool(true) ["I739"]=> bool(true) ["I555"]=> bool(true) ["I832"]=> bool(true) ["I590"]=> bool(true) ["I863"]=> bool(true) ["I683"]=> bool(true) ["I532"]=> bool(true) ["I810"]=> bool(true) ["I567"]=> bool(true) ["I843"]=> bool(true) ["I609"]=> bool(true) ["I95"]=> bool(true) ["I705"]=> bool(true) ["I111"]=> bool(true) ["I725"]=> bool(true) ["I545"]=> bool(true) ["I822"]=> bool(true) ["I578"]=> bool(true) ["I853"]=> bool(true) ["I666"]=> bool(true) ["I331"]=> bool(true) ["I740"]=> bool(true) ["I556"]=> bool(true) ["I833"]=> bool(true) ["I591"]=> bool(true) ["I864"]=> bool(true) ["I685"]=> bool(true) ["I534"]=> bool(true) ["I811"]=> bool(true) ["I568"]=> bool(true) ["I844"]=> bool(true) ["I610"]=> bool(true) ["I96"]=> bool(true) ["I706"]=> bool(true) ["I2475"]=> bool(true) ["I726"]=> bool(true) ["I546"]=> bool(true) ["I823"]=> bool(true) ["I579"]=> bool(true) ["I854"]=> bool(true) ["I671"]=> bool(true) ["I39"]=> bool(true) ["I742"]=> bool(true) ["I557"]=> bool(true) ["I834"]=> bool(true) ["I592"]=> bool(true) ["I865"]=> bool(true) ["I686"]=> bool(true) ["I535"]=> bool(true) ["I812"]=> bool(true) ["I569"]=> bool(true) ["I845"]=> bool(true) ["I611"]=> bool(true) ["I97"]=> bool(true) ["I710"]=> bool(true) ["I2476"]=> bool(true) ["I727"]=> bool(true) ["I547"]=> bool(true) ["I824"]=> bool(true) ["I580"]=> bool(true) ["I855"]=> bool(true) ["I672"]=> bool(true) ["I4"]=> bool(true) ["I743"]=> bool(true) ["I558"]=> bool(true) ["I835"]=> bool(true) ["I593"]=> bool(true) ["I866"]=> bool(true) ["I687"]=> bool(true) ["I536"]=> bool(true) ["I813"]=> bool(true) ["I570"]=> bool(true) ["I846"]=> bool(true) ["I612"]=> bool(true) ["I98"]=> bool(true) ["I711"]=> bool(true) ["I2478"]=> bool(true) ["I728"]=> bool(true) ["I548"]=> bool(true) ["I825"]=> bool(true) ["I581"]=> bool(true) ["I856"]=> bool(true) ["I673"]=> bool(true) ["I40"]=> bool(true) ["I746"]=> bool(true) ["I559"]=> bool(true) ["I836"]=> bool(true) ["I594"]=> bool(true) ["I87"]=> bool(true) ["I688"]=> bool(true) ["I537"]=> bool(true) ["I814"]=> bool(true) ["I571"]=> bool(true) ["I847"]=> bool(true) ["I613"]=> bool(true) ["I712"]=> bool(true) } } ["الحمدان"]=> array(1) { ["الحمدان"]=> array(90) { ["I2433"]=> bool(true) ["I2596"]=> bool(true) ["I782"]=> bool(true) ["I2532"]=> bool(true) ["I2607"]=> bool(true) ["I975"]=> bool(true) ["I2577"]=> bool(true) ["I329"]=> bool(true) ["I2443"]=> bool(true) ["I2597"]=> bool(true) ["I8"]=> bool(true) ["I2533"]=> bool(true) ["I2608"]=> bool(true) ["I977"]=> bool(true) ["I2578"]=> bool(true) ["I330"]=> bool(true) ["I2485"]=> bool(true) ["I2598"]=> bool(true) ["I963"]=> bool(true) ["I2534"]=> bool(true) ["I2609"]=> bool(true) ["I978"]=> bool(true) ["I2579"]=> bool(true) ["I332"]=> bool(true) ["I2523"]=> bool(true) ["I2599"]=> bool(true) ["I965"]=> bool(true) ["I2535"]=> bool(true) ["I2610"]=> bool(true) ["I979"]=> bool(true) ["I2580"]=> bool(true) ["I333"]=> bool(true) ["I2524"]=> bool(true) ["I2600"]=> bool(true) ["I966"]=> bool(true) ["I2536"]=> bool(true) ["I2611"]=> bool(true) ["I980"]=> bool(true) ["I2590"]=> bool(true) ["I334"]=> bool(true) ["I1039"]=> bool(true) ["I2525"]=> bool(true) ["I2601"]=> bool(true) ["I967"]=> bool(true) ["I2537"]=> bool(true) ["I2612"]=> bool(true) ["I982"]=> bool(true) ["I2591"]=> bool(true) ["I335"]=> bool(true) ["I1040"]=> bool(true) ["I2526"]=> bool(true) ["I2602"]=> bool(true) ["I969"]=> bool(true) ["I2538"]=> bool(true) ["I2613"]=> bool(true) ["I983"]=> bool(true) ["I1041"]=> bool(true) ["I2592"]=> bool(true) ["I336"]=> bool(true) ["I2528"]=> bool(true) ["I2603"]=> bool(true) ["I970"]=> bool(true) ["I2539"]=> bool(true) ["I2749"]=> bool(true) ["I984"]=> bool(true) ["I1042"]=> bool(true) ["I2593"]=> bool(true) ["I337"]=> bool(true) ["I2529"]=> bool(true) ["I2604"]=> bool(true) ["I971"]=> bool(true) ["I2540"]=> bool(true) ["I28"]=> bool(true) ["I985"]=> bool(true) ["I1043"]=> bool(true) ["I2594"]=> bool(true) ["I345"]=> bool(true) ["I2530"]=> bool(true) ["I2605"]=> bool(true) ["I972"]=> bool(true) ["I2575"]=> bool(true) ["I2897"]=> bool(true) ["I2393"]=> bool(true) ["I2595"]=> bool(true) ["I620"]=> bool(true) ["I2531"]=> bool(true) ["I2606"]=> bool(true) ["I973"]=> bool(true) ["I2576"]=> bool(true) ["I328"]=> bool(true) } } ["THOMAS"]=> array(1) { ["Thomas"]=> array(75) { ["I1664"]=> bool(true) ["I1865"]=> bool(true) ["I2279"]=> bool(true) ["I1676"]=> bool(true) ["I1910"]=> bool(true) ["I1848"]=> bool(true) ["I1993"]=> bool(true) ["I1666"]=> bool(true) ["I1866"]=> bool(true) ["I2324"]=> bool(true) ["I1690"]=> bool(true) ["I1911"]=> bool(true) ["I1849"]=> bool(true) ["I2062"]=> bool(true) ["I1667"]=> bool(true) ["I1877"]=> bool(true) ["I2325"]=> bool(true) ["I1691"]=> bool(true) ["I1912"]=> bool(true) ["I1850"]=> bool(true) ["I2063"]=> bool(true) ["I1668"]=> bool(true) ["I1878"]=> bool(true) ["I2327"]=> bool(true) ["I1692"]=> bool(true) ["I1926"]=> bool(true) ["I1851"]=> bool(true) ["I2064"]=> bool(true) ["I1669"]=> bool(true) ["I1879"]=> bool(true) ["I2328"]=> bool(true) ["I1836"]=> bool(true) ["I1934"]=> bool(true) ["I1852"]=> bool(true) ["I2094"]=> bool(true) ["I1055"]=> bool(true) ["I1670"]=> bool(true) ["I1882"]=> bool(true) ["I1837"]=> bool(true) ["I1935"]=> bool(true) ["I1854"]=> bool(true) ["I2096"]=> bool(true) ["I1647"]=> bool(true) ["I1671"]=> bool(true) ["I1883"]=> bool(true) ["I1838"]=> bool(true) ["I1944"]=> bool(true) ["I1649"]=> bool(true) ["I1855"]=> bool(true) ["I2097"]=> bool(true) ["I1672"]=> bool(true) ["I1884"]=> bool(true) ["I1839"]=> bool(true) ["I1949"]=> bool(true) ["I1651"]=> bool(true) ["I1856"]=> bool(true) ["I2099"]=> bool(true) ["I1673"]=> bool(true) ["I1885"]=> bool(true) ["I1840"]=> bool(true) ["I1950"]=> bool(true) ["I1653"]=> bool(true) ["I1857"]=> bool(true) ["I2150"]=> bool(true) ["I1674"]=> bool(true) ["I1908"]=> bool(true) ["I1841"]=> bool(true) ["I1989"]=> bool(true) ["I1654"]=> bool(true) ["I1858"]=> bool(true) ["I2151"]=> bool(true) ["I1675"]=> bool(true) ["I1909"]=> bool(true) ["I1847"]=> bool(true) ["I1990"]=> bool(true) } } ["العمري"]=> array(1) { ["العمري"]=> array(66) { ["I179"]=> bool(true) ["I250"]=> bool(true) ["I197"]=> bool(true) ["I2750"]=> bool(true) ["I238"]=> bool(true) ["I315"]=> bool(true) ["I186"]=> bool(true) ["I251"]=> bool(true) ["I198"]=> bool(true) ["I282"]=> bool(true) ["I239"]=> bool(true) ["I316"]=> bool(true) ["I187"]=> bool(true) ["I252"]=> bool(true) ["I203"]=> bool(true) ["I283"]=> bool(true) ["I240"]=> bool(true) ["I318"]=> bool(true) ["I188"]=> bool(true) ["I253"]=> bool(true) ["I216"]=> bool(true) ["I284"]=> bool(true) ["I242"]=> bool(true) ["I319"]=> bool(true) ["I189"]=> bool(true) ["I254"]=> bool(true) ["I217"]=> bool(true) ["I285"]=> bool(true) ["I243"]=> bool(true) ["I344"]=> bool(true) ["I173"]=> bool(true) ["I190"]=> bool(true) ["I255"]=> bool(true) ["I218"]=> bool(true) ["I286"]=> bool(true) ["I244"]=> bool(true) ["I51"]=> bool(true) ["I174"]=> bool(true) ["I192"]=> bool(true) ["I256"]=> bool(true) ["I219"]=> bool(true) ["I287"]=> bool(true) ["I175"]=> bool(true) ["I245"]=> bool(true) ["I193"]=> bool(true) ["I257"]=> bool(true) ["I221"]=> bool(true) ["I311"]=> bool(true) ["I176"]=> bool(true) ["I246"]=> bool(true) ["I194"]=> bool(true) ["I258"]=> bool(true) ["I222"]=> bool(true) ["I312"]=> bool(true) ["I177"]=> bool(true) ["I248"]=> bool(true) ["I195"]=> bool(true) ["I259"]=> bool(true) ["I236"]=> bool(true) ["I313"]=> bool(true) ["I178"]=> bool(true) ["I249"]=> bool(true) ["I196"]=> bool(true) ["I260"]=> bool(true) ["I237"]=> bool(true) ["I314"]=> bool(true) } } ["MADRID"]=> array(1) { ["Madrid"]=> array(64) { ["I1381"]=> bool(true) ["I1538"]=> bool(true) ["I1427"]=> bool(true) ["I2330"]=> bool(true) ["I1497"]=> bool(true) ["I2917"]=> bool(true) ["I1382"]=> bool(true) ["I1540"]=> bool(true) ["I1428"]=> bool(true) ["I2336"]=> bool(true) ["I1498"]=> bool(true) ["I2918"]=> bool(true) ["I1393"]=> bool(true) ["I1572"]=> bool(true) ["I1429"]=> bool(true) ["I2337"]=> bool(true) ["I1523"]=> bool(true) ["I2919"]=> bool(true) ["I1396"]=> bool(true) ["I1573"]=> bool(true) ["I1446"]=> bool(true) ["I2338"]=> bool(true) ["I1525"]=> bool(true) ["I3"]=> bool(true) ["I1397"]=> bool(true) ["I1574"]=> bool(true) ["I1450"]=> bool(true) ["I2339"]=> bool(true) ["I1527"]=> bool(true) ["I1051"]=> bool(true) ["I1398"]=> bool(true) ["I1576"]=> bool(true) ["I1451"]=> bool(true) ["I2353"]=> bool(true) ["I1532"]=> bool(true) ["I1374"]=> bool(true) ["I1401"]=> bool(true) ["I1579"]=> bool(true) ["I1452"]=> bool(true) ["I2357"]=> bool(true) ["I1376"]=> bool(true) ["I1533"]=> bool(true) ["I1402"]=> bool(true) ["I1581"]=> bool(true) ["I1453"]=> bool(true) ["I2359"]=> bool(true) ["I1378"]=> bool(true) ["I1534"]=> bool(true) ["I1404"]=> bool(true) ["I1582"]=> bool(true) ["I1454"]=> bool(true) ["I2361"]=> bool(true) ["I1379"]=> bool(true) ["I1535"]=> bool(true) ["I1411"]=> bool(true) ["I1583"]=> bool(true) ["I1494"]=> bool(true) ["I2362"]=> bool(true) ["I1380"]=> bool(true) ["I1536"]=> bool(true) ["I1426"]=> bool(true) ["I1636"]=> bool(true) ["I1496"]=> bool(true) ["I2916"]=> bool(true) } } ["MAJNIK"]=> array(1) { ["Majnik"]=> array(57) { ["I1064"]=> bool(true) ["I1321"]=> bool(true) ["I1091"]=> bool(true) ["I1332"]=> bool(true) ["I1148"]=> bool(true) ["I1078"]=> bool(true) ["I1322"]=> bool(true) ["I1104"]=> bool(true) ["I1333"]=> bool(true) ["I1151"]=> bool(true) ["I1080"]=> bool(true) ["I1323"]=> bool(true) ["I1110"]=> bool(true) ["I1334"]=> bool(true) ["I1154"]=> bool(true) ["I1081"]=> bool(true) ["I1324"]=> bool(true) ["I1112"]=> bool(true) ["I1336"]=> bool(true) ["I1155"]=> bool(true) ["I1082"]=> bool(true) ["I1325"]=> bool(true) ["I1113"]=> bool(true) ["I1337"]=> bool(true) ["I1218"]=> bool(true) ["I1052"]=> bool(true) ["I1083"]=> bool(true) ["I1326"]=> bool(true) ["I1116"]=> bool(true) ["I153"]=> bool(true) ["I1219"]=> bool(true) ["I1053"]=> bool(true) ["I1084"]=> bool(true) ["I1327"]=> bool(true) ["I1117"]=> bool(true) ["I2705"]=> bool(true) ["I1058"]=> bool(true) ["I1226"]=> bool(true) ["I1085"]=> bool(true) ["I1328"]=> bool(true) ["I1118"]=> bool(true) ["I2901"]=> bool(true) ["I1060"]=> bool(true) ["I1269"]=> bool(true) ["I1086"]=> bool(true) ["I1329"]=> bool(true) ["I1119"]=> bool(true) ["I1061"]=> bool(true) ["I1275"]=> bool(true) ["I1087"]=> bool(true) ["I1330"]=> bool(true) ["I1120"]=> bool(true) ["I1062"]=> bool(true) ["I1319"]=> bool(true) ["I1090"]=> bool(true) ["I1331"]=> bool(true) ["I1147"]=> bool(true) } } ["الدبيان"]=> array(1) { ["الدبيان"]=> array(39) { ["I655"]=> bool(true) ["I918"]=> bool(true) ["I731"]=> bool(true) ["I872"]=> bool(true) ["I656"]=> bool(true) ["I759"]=> bool(true) ["I873"]=> bool(true) ["I657"]=> bool(true) ["I760"]=> bool(true) ["I875"]=> bool(true) ["I658"]=> bool(true) ["I761"]=> bool(true) ["I876"]=> bool(true) ["I708"]=> bool(true) ["I791"]=> bool(true) ["I877"]=> bool(true) ["I560"]=> bool(true) ["I709"]=> bool(true) ["I792"]=> bool(true) ["I878"]=> bool(true) ["I585"]=> bool(true) ["I716"]=> bool(true) ["I867"]=> bool(true) ["I629"]=> bool(true) ["I879"]=> bool(true) ["I717"]=> bool(true) ["I868"]=> bool(true) ["I652"]=> bool(true) ["I914"]=> bool(true) ["I720"]=> bool(true) ["I869"]=> bool(true) ["I653"]=> bool(true) ["I915"]=> bool(true) ["I721"]=> bool(true) ["I870"]=> bool(true) ["I654"]=> bool(true) ["I916"]=> bool(true) ["I722"]=> bool(true) ["I871"]=> bool(true) } } ["اسماعيل"]=> array(1) { ["اسماعيل"]=> array(39) { ["I2764"]=> bool(true) ["I2803"]=> bool(true) ["I2779"]=> bool(true) ["I2792"]=> bool(true) ["I2765"]=> bool(true) ["I2780"]=> bool(true) ["I2793"]=> bool(true) ["I2766"]=> bool(true) ["I2781"]=> bool(true) ["I2794"]=> bool(true) ["I2769"]=> bool(true) ["I2782"]=> bool(true) ["I2795"]=> bool(true) ["I2770"]=> bool(true) ["I2783"]=> bool(true) ["I2796"]=> bool(true) ["I2753"]=> bool(true) ["I2771"]=> bool(true) ["I2784"]=> bool(true) ["I2797"]=> bool(true) ["I2754"]=> bool(true) ["I2772"]=> bool(true) ["I2785"]=> bool(true) ["I2759"]=> bool(true) ["I2798"]=> bool(true) ["I2773"]=> bool(true) ["I2786"]=> bool(true) ["I2760"]=> bool(true) ["I2800"]=> bool(true) ["I2774"]=> bool(true) ["I2787"]=> bool(true) ["I2762"]=> bool(true) ["I2801"]=> bool(true) ["I2775"]=> bool(true) ["I2790"]=> bool(true) ["I2763"]=> bool(true) ["I2802"]=> bool(true) ["I2778"]=> bool(true) ["I2791"]=> bool(true) } } ["BANNER"]=> array(1) { ["Banner"]=> array(39) { ["I1844"]=> bool(true) ["I518"]=> bool(true) ["I2012"]=> bool(true) ["I2028"]=> bool(true) ["I1845"]=> bool(true) ["I2013"]=> bool(true) ["I2110"]=> bool(true) ["I1846"]=> bool(true) ["I2014"]=> bool(true) ["I2111"]=> bool(true) ["I1914"]=> bool(true) ["I2015"]=> bool(true) ["I2112"]=> bool(true) ["I1915"]=> bool(true) ["I2018"]=> bool(true) ["I2113"]=> bool(true) ["I1685"]=> bool(true) ["I1916"]=> bool(true) ["I2019"]=> bool(true) ["I2114"]=> bool(true) ["I1687"]=> bool(true) ["I1917"]=> bool(true) ["I2020"]=> bool(true) ["I1688"]=> bool(true) ["I2115"]=> bool(true) ["I1923"]=> bool(true) ["I2021"]=> bool(true) ["I1689"]=> bool(true) ["I2116"]=> bool(true) ["I2006"]=> bool(true) ["I2022"]=> bool(true) ["I1701"]=> bool(true) ["I2117"]=> bool(true) ["I2007"]=> bool(true) ["I2024"]=> bool(true) ["I1703"]=> bool(true) ["I2120"]=> bool(true) ["I2008"]=> bool(true) ["I2027"]=> bool(true) } } }

Open in new window

SamooramadAuthor Commented:
It looks like the numbers (Ex: I2021) are the ID numbers for family members. So is this an array of arrays that counted members of each family, maybe?
SamooramadAuthor Commented:
So now I need to pull the actual surnames for this before I can check on the language, right?
Ray PaseurCommented:
Yes, I think that's right.  You may also find that the output from var_dump() is easier to read if you use "view source" or send a <pre> tag to the browser.  If you want something like this to be useful to others at E-E, it's helpful to put it into the Code snippet.  Then we can Select All, copy it, etc.

If you use var_export() instead of var_dump() you can get a PHP-code representation of the data that can be copied and used in a script.  That might be helpful here, since it appears that the Arabic characters are being used in the array indexes.
SamooramadAuthor Commented:
var_export() resulted in:
 array ( 'القدهي' => array ( 'القدهي' => array ( 'I14' => true, 'I2849' => true, 'I2551' => true, 'I2881' => true, 'I2713' => true, 'I372' => true, 'I2748' => true, 'I63' => true, 'I74' => true, 'I167' => true, 'I2860' => true, 'I2563' => true, 'I2892' => true, 'I2724' => true, 'I383' => true, 'I2828' => true, 'I2839' => true, 'I946' => true, 'I201' => true, 'I2871' => true, 'I2678' => true, 'I32' => true, 'I2736' => true, 'I53' => true, 'I1' => true, 'I140' => true, 'I2850' => true, 'I2552' => true, 'I2882' => true, 'I2714' => true, 'I373' => true, 'I2818' => true, 'I64' => true, 'I75' => true, 'I168' => true, 'I2861' => true, 'I2571' => true, 'I2893' => true, 'I2725' => true, 'I385' => true, 'I2829' => true, 'I101' => true, 'I2840' => true, 'I947' => true, 'I202' => true, 'I2872' => true, 'I2694' => true, 'I350' => true, 'I2737' => true, 'I54' => true, 'I141' => true, 'I2851' => true, 'I2553' => true, 'I2883' => true, 'I2715' => true, 'I374' => true, 'I2819' => true, 'I65' => true, 'I77' => true, 'I169' => true, 'I2862' => true, 'I261' => true, 'I2894' => true, 'I2726' => true, 'I386' => true, 'I2830' => true, 'I102' => true, 'I2841' => true, 'I968' => true, 'I21' => true, 'I2873' => true, 'I2695' => true, 'I351' => true, 'I2738' => true, 'I55' => true, 'I142' => true, 'I2852' => true, 'I2554' => true, 'I2884' => true, 'I2716' => true, 'I375' => true, 'I2820' => true, 'I66' => true, 'I921' => true, 'I17' => true, 'I2863' => true, 'I2666' => true, 'I2895' => true, 'I2728' => true, 'I387' => true, 'I2831' => true, 'I11' => true, 'I2842' => true, 'I22' => true, 'I2874' => true, 'I2696' => true, 'I365' => true, 'I2739' => true, 'I56' => true, 'I143' => true, 'I2853' => true, 'I2556' => true, 'I2885' => true, 'I2717' => true, 'I376' => true, 'I2821' => true, 'I67' => true, 'I924' => true, 'I172' => true, 'I2864' => true, 'I2667' => true, 'I2896' => true, 'I2729' => true, 'I388' => true, 'I2832' => true, 'I115' => true, 'I2843' => true, 'I224' => true, 'I2875' => true, 'I2697' => true, 'I366' => true, 'I2740' => true, 'I57' => true, 'I144' => true, 'I2854' => true, 'I2557' => true, 'I2886' => true, 'I2718' => true, 'I377' => true, 'I2822' => true, 'I68' => true, 'I925' => true, 'I181' => true, 'I2865' => true, 'I2668' => true, 'I2898' => true, 'I2730' => true, 'I389' => true, 'I2833' => true, 'I12' => true, 'I2844' => true, 'I23' => true, 'I2876' => true, 'I2698' => true, 'I367' => true, 'I2741' => true, 'I58' => true, 'I146' => true, 'I2855' => true, 'I2558' => true, 'I2887' => true, 'I2719' => true, 'I378' => true, 'I2823' => true, 'I7' => true, 'I2834' => true, 'I927' => true, 'I19' => true, 'I2866' => true, 'I2672' => true, 'I2899' => true, 'I2731' => true, 'I390' => true, 'I13' => true, 'I2845' => true, 'I24' => true, 'I2877' => true, 'I2709' => true, 'I368' => true, 'I2742' => true, 'I59' => true, 'I147' => true, 'I2856' => true, 'I2559' => true, 'I2888' => true, 'I2720' => true, 'I38' => true, 'I2824' => true, 'I70' => true, 'I2835' => true, 'I930' => true, 'I199' => true, 'I2867' => true, 'I2674' => true, 'I2900' => true, 'I2732' => true, 'I391' => true, 'I136' => true, 'I2846' => true, 'I2442' => true, 'I2878' => true, 'I2710' => true, 'I369' => true, 'I2743' => true, 'I60' => true, 'I148' => true, 'I2857' => true, 'I2560' => true, 'I2889' => true, 'I2721' => true, 'I380' => true, 'I2825' => true, 'I71' => true, 'I2836' => true, 'I931' => true, 'I2' => true, 'I2868' => true, 'I2675' => true, 'I2912' => true, 'I2733' => true, 'I392' => true, 'I138' => true, 'I2847' => true, 'I2447' => true, 'I2879' => true, 'I2711' => true, 'I370' => true, 'I2744' => true, 'I61' => true, 'I15' => true, 'I2858' => true, 'I2561' => true, 'I2890' => true, 'I2722' => true, 'I381' => true, 'I2826' => true, 'I72' => true, 'I2837' => true, 'I932' => true, 'I20' => true, 'I2869' => true, 'I2676' => true, 'I2913' => true, 'I2734' => true, 'I393' => true, 'I139' => true, 'I2848' => true, 'I2550' => true, 'I2880' => true, 'I2712' => true, 'I371' => true, 'I2746' => true, 'I62' => true, 'I16' => true, 'I2859' => true, 'I2562' => true, 'I2891' => true, 'I2723' => true, 'I382' => true, 'I2827' => true, 'I73' => true, 'I2838' => true, 'I945' => true, 'I200' => true, 'I2870' => true, 'I2677' => true, 'I2914' => true, 'I2735' => true, 'I52' => true, ), ), 'العجروش' => array ( 'العجروش' => array ( 'I2640' => true, 'I737' => true, 'I553' => true, 'I830' => true, 'I588' => true, 'I861' => true, 'I680' => true, 'I529' => true, 'I808' => true, 'I565' => true, 'I841' => true, 'I599' => true, 'I92' => true, 'I702' => true, 'I723' => true, 'I543' => true, 'I819' => true, 'I576' => true, 'I851' => true, 'I631' => true, 'I100' => true, 'I265' => true, 'I738' => true, 'I554' => true, 'I831' => true, 'I589' => true, 'I862' => true, 'I682' => true, 'I531' => true, 'I809' => true, 'I566' => true, 'I842' => true, 'I6' => true, 'I93' => true, 'I703' => true, 'I110' => true, 'I724' => true, 'I544' => true, 'I821' => true, 'I577' => true, 'I852' => true, 'I665' => true, 'I278' => true, 'I739' => true, 'I555' => true, 'I832' => true, 'I590' => true, 'I863' => true, 'I683' => true, 'I532' => true, 'I810' => true, 'I567' => true, 'I843' => true, 'I609' => true, 'I95' => true, 'I705' => true, 'I111' => true, 'I725' => true, 'I545' => true, 'I822' => true, 'I578' => true, 'I853' => true, 'I666' => true, 'I331' => true, 'I740' => true, 'I556' => true, 'I833' => true, 'I591' => true, 'I864' => true, 'I685' => true, 'I534' => true, 'I811' => true, 'I568' => true, 'I844' => true, 'I610' => true, 'I96' => true, 'I706' => true, 'I2475' => true, 'I726' => true, 'I546' => true, 'I823' => true, 'I579' => true, 'I854' => true, 'I671' => true, 'I39' => true, 'I742' => true, 'I557' => true, 'I834' => true, 'I592' => true, 'I865' => true, 'I686' => true, 'I535' => true, 'I812' => true, 'I569' => true, 'I845' => true, 'I611' => true, 'I97' => true, 'I710' => true, 'I2476' => true, 'I727' => true, 'I547' => true, 'I824' => true, 'I580' => true, 'I855' => true, 'I672' => true, 'I4' => true, 'I743' => true, 'I558' => true, 'I835' => true, 'I593' => true, 'I866' => true, 'I687' => true, 'I536' => true, 'I813' => true, 'I570' => true, 'I846' => true, 'I612' => true, 'I98' => true, 'I711' => true, 'I2478' => true, 'I728' => true, 'I548' => true, 'I825' => true, 'I581' => true, 'I856' => true, 'I673' => true, 'I40' => true, 'I746' => true, 'I559' => true, 'I836' => true, 'I594' => true, 'I87' => true, 'I688' => true, 'I712' => true, 'I537' => true, 'I814' => true, 'I571' => true, 'I847' => true, 'I613' => true, 'I2479' => true, 'I729' => true, 'I549' => true, 'I826' => true, 'I582' => true, 'I857' => true, 'I675' => true, 'I41' => true, 'I748' => true, 'I561' => true, 'I837' => true, 'I595' => true, 'I874' => true, 'I692' => true, 'I713' => true, 'I538' => true, 'I815' => true, 'I572' => true, 'I848' => true, 'I614' => true, 'I2494' => true, 'I730' => true, 'I550' => true, 'I827' => true, 'I583' => true, 'I858' => true, 'I676' => true, 'I42' => true, 'I790' => true, 'I562' => true, 'I838' => true, 'I596' => true, 'I88' => true, 'I697' => true, 'I714' => true, 'I539' => true, 'I816' => true, 'I573' => true, 'I849' => true, 'I615' => true, 'I263' => true, 'I735' => true, 'I551' => true, 'I828' => true, 'I584' => true, 'I859' => true, 'I677' => true, 'I43' => true, 'I806' => true, 'I563' => true, 'I839' => true, 'I597' => true, 'I89' => true, 'I700' => true, 'I715' => true, 'I540' => true, 'I817' => true, 'I574' => true, 'I85' => true, 'I616' => true, 'I264' => true, 'I736' => true, 'I552' => true, 'I829' => true, 'I587' => true, 'I860' => true, 'I679' => true, 'I528' => true, 'I807' => true, 'I564' => true, 'I840' => true, 'I598' => true, 'I91' => true, 'I701' => true, 'I718' => true, 'I542' => true, 'I818' => true, 'I575' => true, 'I850' => true, 'I630' => true, ), ), 'الحمدان' => array ( 'الحمدان' => array ( 'I2524' => true, 'I2600' => true, 'I966' => true, 'I2536' => true, 'I2611' => true, 'I980' => true, 'I2590' => true, 'I334' => true, 'I1039' => true, 'I2525' => true, 'I2601' => true, 'I967' => true, 'I2537' => true, 'I2612' => true, 'I982' => true, 'I1040' => true, 'I2591' => true, 'I335' => true, 'I2526' => true, 'I2602' => true, 'I969' => true, 'I2538' => true, 'I2613' => true, 'I983' => true, 'I1041' => true, 'I2592' => true, 'I336' => true, 'I2528' => true, 'I2603' => true, 'I970' => true, 'I2539' => true, 'I2749' => true, 'I984' => true, 'I1042' => true, 'I2593' => true, 'I337' => true, 'I2529' => true, 'I2604' => true, 'I971' => true, 'I2540' => true, 'I28' => true, 'I985' => true, 'I1043' => true, 'I2594' => true, 'I345' => true, 'I2530' => true, 'I2605' => true, 'I972' => true, 'I2575' => true, 'I2897' => true, 'I2393' => true, 'I2595' => true, 'I620' => true, 'I2531' => true, 'I2606' => true, 'I973' => true, 'I2576' => true, 'I328' => true, 'I2433' => true, 'I2596' => true, 'I782' => true, 'I2532' => true, 'I2607' => true, 'I975' => true, 'I2577' => true, 'I329' => true, 'I2443' => true, 'I2597' => true, 'I8' => true, 'I2533' => true, 'I2608' => true, 'I977' => true, 'I2578' => true, 'I330' => true, 'I2485' => true, 'I2598' => true, 'I963' => true, 'I2534' => true, 'I2609' => true, 'I978' => true, 'I2579' => true, 'I332' => true, 'I2523' => true, 'I2599' => true, 'I965' => true, 'I2535' => true, 'I2610' => true, 'I979' => true, 'I2580' => true, 'I333' => true, ), ), 'THOMAS' => array ( 'Thomas' => array ( 'I1669' => true, 'I1879' => true, 'I2328' => true, 'I1836' => true, 'I1934' => true, 'I1852' => true, 'I2094' => true, 'I1055' => true, 'I1670' => true, 'I1882' => true, 'I1837' => true, 'I1935' => true, 'I1647' => true, 'I1854' => true, 'I2096' => true, 'I1671' => true, 'I1883' => true, 'I1838' => true, 'I1944' => true, 'I1649' => true, 'I1855' => true, 'I2097' => true, 'I1672' => true, 'I1884' => true, 'I1839' => true, 'I1949' => true, 'I1651' => true, 'I1856' => true, 'I2099' => true, 'I1673' => true, 'I1885' => true, 'I1840' => true, 'I1950' => true, 'I1653' => true, 'I1857' => true, 'I2150' => true, 'I1674' => true, 'I1908' => true, 'I1841' => true, 'I1989' => true, 'I1654' => true, 'I1858' => true, 'I2151' => true, 'I1675' => true, 'I1909' => true, 'I1847' => true, 'I1990' => true, 'I1664' => true, 'I1865' => true, 'I2279' => true, 'I1676' => true, 'I1910' => true, 'I1848' => true, 'I1993' => true, 'I1666' => true, 'I1866' => true, 'I2324' => true, 'I1690' => true, 'I1911' => true, 'I1849' => true, 'I2062' => true, 'I1667' => true, 'I1877' => true, 'I2325' => true, 'I1691' => true, 'I1912' => true, 'I1850' => true, 'I2063' => true, 'I1668' => true, 'I1878' => true, 'I2327' => true, 'I1692' => true, 'I1926' => true, 'I1851' => true, 'I2064' => true, ), ), 'العمري' => array ( 'العمري' => array ( 'I189' => true, 'I254' => true, 'I217' => true, 'I285' => true, 'I243' => true, 'I344' => true, 'I173' => true, 'I190' => true, 'I255' => true, 'I218' => true, 'I286' => true, 'I174' => true, 'I244' => true, 'I51' => true, 'I192' => true, 'I256' => true, 'I219' => true, 'I287' => true, 'I175' => true, 'I245' => true, 'I193' => true, 'I257' => true, 'I221' => true, 'I311' => true, 'I176' => true, 'I246' => true, 'I194' => true, 'I258' => true, 'I222' => true, 'I312' => true, 'I177' => true, 'I248' => true, 'I195' => true, 'I259' => true, 'I236' => true, 'I313' => true, 'I178' => true, 'I249' => true, 'I196' => true, 'I260' => true, 'I237' => true, 'I314' => true, 'I179' => true, 'I250' => true, 'I197' => true, 'I2750' => true, 'I238' => true, 'I315' => true, 'I186' => true, 'I251' => true, 'I198' => true, 'I282' => true, 'I239' => true, 'I316' => true, 'I187' => true, 'I252' => true, 'I203' => true, 'I283' => true, 'I240' => true, 'I318' => true, 'I188' => true, 'I253' => true, 'I216' => true, 'I284' => true, 'I242' => true, 'I319' => true, ), ), 'MADRID' => array ( 'Madrid' => array ( 'I1397' => true, 'I1574' => true, 'I1450' => true, 'I2339' => true, 'I1527' => true, 'I1051' => true, 'I1398' => true, 'I1576' => true, 'I1451' => true, 'I2353' => true, 'I1374' => true, 'I1532' => true, 'I1401' => true, 'I1579' => true, 'I1452' => true, 'I2357' => true, 'I1376' => true, 'I1533' => true, 'I1402' => true, 'I1581' => true, 'I1453' => true, 'I2359' => true, 'I1378' => true, 'I1534' => true, 'I1404' => true, 'I1582' => true, 'I1454' => true, 'I2361' => true, 'I1379' => true, 'I1535' => true, 'I1411' => true, 'I1583' => true, 'I1494' => true, 'I2362' => true, 'I1380' => true, 'I1536' => true, 'I1426' => true, 'I1636' => true, 'I1496' => true, 'I2916' => true, 'I1381' => true, 'I1538' => true, 'I1427' => true, 'I2330' => true, 'I1497' => true, 'I2917' => true, 'I1382' => true, 'I1540' => true, 'I1428' => true, 'I2336' => true, 'I1498' => true, 'I2918' => true, 'I1393' => true, 'I1572' => true, 'I1429' => true, 'I2337' => true, 'I1523' => true, 'I2919' => true, 'I1396' => true, 'I1573' => true, 'I1446' => true, 'I2338' => true, 'I1525' => true, 'I3' => true, ), ), 'MAJNIK' => array ( 'Majnik' => array ( 'I1082' => true, 'I1325' => true, 'I1113' => true, 'I1337' => true, 'I1218' => true, 'I1052' => true, 'I1083' => true, 'I1326' => true, 'I1116' => true, 'I153' => true, 'I1053' => true, 'I1219' => true, 'I1084' => true, 'I1327' => true, 'I1117' => true, 'I2705' => true, 'I1058' => true, 'I1226' => true, 'I1085' => true, 'I1328' => true, 'I1118' => true, 'I2901' => true, 'I1060' => true, 'I1269' => true, 'I1086' => true, 'I1329' => true, 'I1119' => true, 'I1061' => true, 'I1275' => true, 'I1087' => true, 'I1330' => true, 'I1120' => true, 'I1062' => true, 'I1319' => true, 'I1090' => true, 'I1331' => true, 'I1147' => true, 'I1064' => true, 'I1321' => true, 'I1091' => true, 'I1332' => true, 'I1148' => true, 'I1078' => true, 'I1322' => true, 'I1104' => true, 'I1333' => true, 'I1151' => true, 'I1080' => true, 'I1323' => true, 'I1110' => true, 'I1334' => true, 'I1154' => true, 'I1081' => true, 'I1324' => true, 'I1112' => true, 'I1336' => true, 'I1155' => true, ), ), 'اسماعيل' => array ( 'اسماعيل' => array ( 'I2770' => true, 'I2783' => true, 'I2796' => true, 'I2753' => true, 'I2771' => true, 'I2784' => true, 'I2754' => true, 'I2797' => true, 'I2772' => true, 'I2785' => true, 'I2759' => true, 'I2798' => true, 'I2773' => true, 'I2786' => true, 'I2760' => true, 'I2800' => true, 'I2774' => true, 'I2787' => true, 'I2762' => true, 'I2801' => true, 'I2775' => true, 'I2790' => true, 'I2763' => true, 'I2802' => true, 'I2778' => true, 'I2791' => true, 'I2764' => true, 'I2803' => true, 'I2779' => true, 'I2792' => true, 'I2765' => true, 'I2780' => true, 'I2793' => true, 'I2766' => true, 'I2781' => true, 'I2794' => true, 'I2769' => true, 'I2782' => true, 'I2795' => true, ), ), 'BANNER' => array ( 'Banner' => array ( 'I1915' => true, 'I2018' => true, 'I2113' => true, 'I1685' => true, 'I1916' => true, 'I2019' => true, 'I1687' => true, 'I2114' => true, 'I1917' => true, 'I2020' => true, 'I1688' => true, 'I2115' => true, 'I1923' => true, 'I2021' => true, 'I1689' => true, 'I2116' => true, 'I2006' => true, 'I2022' => true, 'I1701' => true, 'I2117' => true, 'I2007' => true, 'I2024' => true, 'I1703' => true, 'I2120' => true, 'I2008' => true, 'I2027' => true, 'I1844' => true, 'I518' => true, 'I2012' => true, 'I2028' => true, 'I1845' => true, 'I2013' => true, 'I2110' => true, 'I1846' => true, 'I2014' => true, 'I2111' => true, 'I1914' => true, 'I2015' => true, 'I2112' => true, ), ), 'الدبيان' => array ( 'الدبيان' => array ( 'I708' => true, 'I791' => true, 'I877' => true, 'I560' => true, 'I709' => true, 'I792' => true, 'I585' => true, 'I878' => true, 'I716' => true, 'I867' => true, 'I629' => true, 'I879' => true, 'I717' => true, 'I868' => true, 'I652' => true, 'I914' => true, 'I720' => true, 'I869' => true, 'I653' => true, 'I915' => true, 'I721' => true, 'I870' => true, 'I654' => true, 'I916' => true, 'I722' => true, 'I871' => true, 'I655' => true, 'I918' => true, 'I731' => true, 'I872' => true, 'I656' => true, 'I759' => true, 'I873' => true, 'I657' => true, 'I760' => true, 'I875' => true, 'I658' => true, 'I761' => true, 'I876' => true, ), ), ) 

Open in new window

SamooramadAuthor Commented:
so now how do I apply the check for language to this data?
SamooramadAuthor Commented:
Nevermind, figured it out. mb_ereg wouldn't remove Arabic only. It was removing Arabic and English but ctype worked.

// Remove English Names on Arabic page list - Added By Me requested by family


           if ($TEXT_DIRECTION == "rtl") 
           {      
              foreach ($all_surnames as $key => $value) 
              {

               //if (mb_ereg('[\x{0600}-\x{06FF}]', $key)) unset($all_surnames[UTF8_strtoupper($key)]);
                 if (ctype_alpha(UTF8_strtoupper($key))) unset($all_surnames[UTF8_strtoupper($key)]);
              } 
	   } 
           

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SamooramadAuthor Commented:
I figured it out but expert comment pushed me in the right direction
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.