|
-
January 24th, 2008, 07:54 AM
#16
Re: remove duplicates and sort array
 Originally Posted by JACKWEBS
For example, in the code above when you alert(TestArray[2]); it only alerts one row of the array. And shouldn't it pick out the value SY400? It is alreting the entire row.
unique only seems to be returning 1 row. Can't figure out where though
What are you talking about? The code I posted only removes duplicates from one array. I have stated this many times. There is nothing strange about how it is working.
 Originally Posted by JACKWEBS
Sometimes, I need to check column 1 and remove duplicates leaving me with:
1,Jones, SY300
2,SMith, SY300
Sometimes, I need to check column 3 and remove duplicates leaving me with:
1,ABAB, Sy400
The above quote implies that you were just going to call it on certain arrays in the second dimension, NOT ALL. If you want it to remove the duplicates in EVERY second dimension array, you have to loop (for) through the first dimension while calling it upon the second.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|