Thanks to both for the direction.
--Rick
On Apr 27, 2012, at 4:13 PM, Jim Giner wrote:
>
>
> Are these arrays nested in an array? In that case the manual says you have
> to do the compare differently.
On Apr 27, 2012, at 4:19 PM, admin wrote:
>
>
> -Original Message-
> From:
-Original Message-
From: Rick Dwyer [mailto:rpdw...@earthlink.net]
Sent: Friday, April 27, 2012 3:37 PM
To: PHP-General
Subject: [PHP] Array_diff problems
Hello all.
I have two arrays and when compared against each other via array_diff, I do
not get any output:
$myarray1 = Array (
[0]
Thiago H. Pojda wrote:
Ok, forget everything... it was just a user (programmer) problem..
while in translation process, labels_es became a copy of labels_pt :P
Sorry about the noise.
PS: Hoorray: again in list _o/
On Wed, Jun 25, 2008 at 5:24 PM, Thiago H. Pojda <[EMAIL PROTECTED]>
wrot
On Wed, Jun 25, 2008 at 4:31 PM, Thiago H. Pojda <[EMAIL PROTECTED]> wrote:
>
> PS: Hoorray: again in list _o/
Yeah, I noticed your softpartech address was closed out.
--
Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just
$59.99/mo. with no contract!
Dedicated servers, VP
Ok, forget everything... it was just a user (programmer) problem..
while in translation process, labels_es became a copy of labels_pt :P
Sorry about the noise.
PS: Hoorray: again in list _o/
On Wed, Jun 25, 2008 at 5:24 PM, Thiago H. Pojda <[EMAIL PROTECTED]>
wrote:
> I just hit tab and sp
I just hit tab and space at once and gmail just sent it ;)
Well, I'm not reaching that size, hehe.
Btw, PHP Version 5.2.6
On Wed, Jun 25, 2008 at 5:19 PM, Daniel Brown <[EMAIL PROTECTED]> wrote:
> On Wed, Jun 25, 2008 at 4:08 PM, Wolf <[EMAIL PROTECTED]> wrote:
> >
> > So, where is your code th
Actually that was a miss when I was "translating" var names.
Here follows the code again, untouched this time:
File _pt has ~2300 lines while file _es has ~1700. Not a chance of them
having the same labels :)
On Wed, Jun 25, 2008 at 5:18 PM, Boyd, Todd M. <[EMAIL PROTECTED]> wrote:
> > -O
On Wed, Jun 25, 2008 at 4:08 PM, Wolf <[EMAIL PROTECTED]> wrote:
>
> So, where is your code that isn't working right?
Yeah, come on, Thiago, show code. You know better than that! ;-P
And by the way, I *believe* that as long as your arrays are <=
65,355 entries - while it will be slow an
> -Original Message-
> From: Thiago H. Pojda [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 25, 2008 3:10 PM
> To: php-general@lists.php.net
> Subject: [PHP] array_diff()?
>
> *accidentally sent*
>
> Guys,
>
> Perhaps I'm missing something or just trying with the wrong tools...
>
> B
Thiago H. Pojda wrote:
Guys,
Perhaps I'm missing something or just trying with the wrong tools...
But the thing is, I have two arrays and want to know what values are in one
that aren't in the other.
They're very long arrays (label files for translation)
You know, in the manual array_diff is
On Sun, June 26, 2005 2:19 am, André Le Tissier said:
> Help! Array_diff is the perfect function for what I am try to do but I
> have
> a php version 4.1.5. Is there any replacement I can use to achieve the
> same
> result
There are seven different solutions to this (with modifications of what
arr
As far as I can see in the Help File, Array_Diff was introduced in 4.0.1 and
should be in the version you are using.
Does it not work?
-Original Message-
From: André Le Tissier [mailto:[EMAIL PROTECTED]
Sent: 26 June 2005 10:20
To: php-general@lists.php.net
Subject: [PHP] array_diff php
On Wed, May 18, 2005 8:03 pm, Pablo Gosse said:
> Howdy folks. I'm running into something strange with array_diff that
> I'm hoping someone can shed some light on.
If you are running PHP 4.0.4, the manual states that the function was
"broken"...
> I have two tab-delimited text files, and need to
-unsubscribe-digest-
- Original Message -
From: "Pablo Gosse" <[EMAIL PROTECTED]>
To: "PHP"
Sent: Wednesday, May 18, 2005 11:03 PM
Subject: [PHP] array_diff odities
Howdy folks. I'm running into something strange with array_diff that
I'm hoping someone can shed some light on.
I have t
On Thu, Oct 02, 2003 at 11:28:23AM +0200, Angelo Zanetti wrote:
:
: I know what the problem was, firstly that when doing an array_diff the keys
: are preserved. Therefore If I was looping through $arrayResult for the count
: of elements (in this case 2) then thats where the blank value comes in. S
-Original Message-
From: Angelo Zanetti [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 02, 2003 11:28 AM
To: Eugene Lee; [EMAIL PROTECTED]
Subject: RE: [PHP] array_diff
thanx Eugene,
I know what the problem was, firstly that when doing an array_diff the keys
are preserved
values out the $arrayResult.
TIA.
-Original Message-
From: Eugene Lee [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 02, 2003 11:09 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] array_diff
On Thu, Oct 02, 2003 at 10:44:15AM +0200, Angelo Zanetti wrote:
:
: I am getting some weird results
On Thu, Oct 02, 2003 at 10:44:15AM +0200, Angelo Zanetti wrote:
:
: I am getting some weird results when using the array_diff() function.
:
: eg: $arrayResult = array_diff($array1, $array2);
:
: When i use it the resulting array ($arrayResult) gets the correct number of
: elements, however when
No, but need to have same data types. You cannot compare String against
Integers and so
Regards
-Original Message-
From: Angelo Zanetti [mailto:[EMAIL PROTECTED]
Sent: miércoles, 01 de octubre de 2003 11:49
To: [EMAIL PROTECTED]
Subject: [PHP] array_diff()
HI all,
I looked at the P
On Wed, Oct 01, 2003 at 11:49:29AM +0200, Angelo Zanetti wrote:
:
: I looked at the PHP manual and it doesnt say much about this function.
: what I want to know is that, do the 2 arrays have to have the same
: length of number of elements?
Nope.
Re-examine Example 1: $array1 and $array2 are diff
On Mon, Apr 02, 2001 at 05:15:26PM +0200, Martin Skjöldebrand wrote:
> I'm afraid I dont quite under stand the output you gave (maybe ... or do
> you mean var_dump included the number of the array elements?)
First I echoed the number, then var_dump() also printed it, try
var_dump yourself.
Stig
Stig Venaas wrote:
> So the arrays contain one string each? array_diff() won't work then.
Sorry - my fault.
I'm getting the values from a database - not manually added.
> Try this:
>
> $a = array(1, 2, 3, 4, 5);
> $b = array(1, 2);
> $test = array_diff($a, $b);
> $lines = count($test);
> echo
On Mon, Apr 02, 2001 at 12:41:07AM -0700, V e r b a l wrote:
> I'm daft. I don't understand the PHP Manual.
>
> I have two arrays:
> Open[0] contains 1 2 3 4 5
> Closed[0] contains 1 2
So the arrays contain one string each? array_diff() won't work then.
Try this:
$a = array(1, 2, 3, 4, 5);
$b =
23 matches
Mail list logo