RE: [PHP] Remove duplicates, as long as you have it.
| From: | Jack Dempsey | Date: | Sun, 22 Apr 2001 16:40:40 +0000 |
| Subject: | RE: [PHP] Remove duplicates, as long as you have it. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-49750@lists.php.net to get a copy of this message | ||
if the lines are exact duplicates, then you could open the file with PHP or
Perl, then scan through it, line by line, each time throwing the line in the
next cell of an array....then you should be able to sort by the values in
those cells, and after you have that, deleting duplicates would be
simple.....
-----Original Message-----
From: Richard [mailto:oblivion@lunamorena.net]
Sent: Sunday, April 22, 2001 12:27 PM
To: php-general@lists.php.net
Subject: Re: [PHP] Remove duplicates, as long as you have it.
That removes instances in an array, I am talking about a file. Each line
contains non-duplicate words, but the lines are mixed and duplicated,
perhaps trippled.
- Richard
""Taylor, Stewart"" <Stewart.Taylor@uk.thalesgroup.com> wrote in message
news:2B25A9C95DC8D411BBE500508BB19239515CCC@ntslxch1.int.rdel.co.uk...
> Have you tried the array_unique function
> http://www.php.net/manual/en/function.array-unique.php
>
>
> -Stewart
>
> -----Original Message-----
> From: Richard [mailto:oblivion@lunamorena.net]
> Sent: 22 April 2001 12:36
> To: php-general@lists.php.net
> Subject: [PHP] Remove duplicates, as long as you have it.
>
>
> Greetings.
>
> I have this link file which has been active for quite a while, but the
> problem is that when I used a "admin" program to manage the links
> (admin.php) it kinda wrote the file multiple times, which means that it
has
> sorted the file and added multiple instances of the lines.
>
> How I managed to create it? Well, by using the free
linkadd/linkmanager
> PHP script. Anyhow, what I need is how can I remove duplicates that are
> sorted in arrays? Or does anyone of you has such a script or C++ program,
so
> you could sort the file for me or something?
>
> Thanks
> - Richard
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net