Re: different value in array

From: Date: Sat, 29 Jul 2006 08:00:09 +0000
Subject: Re: different value in array
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-239871@lists.php.net to get a copy of this message
At 12:20 AM 7/29/2006, Paul Novitski wrote:
You might consider concatenating all the elements in each sub-array to make the comparison logic simpler, e.g.:
        foreach ($currenttablearr as $key => $subarray)
        {
                $comparisonArray[$key] = explode("_", $subarray);
        }
This would result in:
        $comparisonArray[0] == "1235_Malaysia_cd-12345_ws8950"
        $comparisonArray[1] == "1235_Singapore_cd-890_ws1234"
Sorry, of course I meant implode(), not explode()! http://php.net/implode Paul

« previous php.general (#239871) next »