| | |||||
| ||||||||
| CODE This forum is for posting code snippets and example scripts that aren't quite tutorials, but could be useful for others. You may post code snippets and/or completed scripts that you've written and want to share here. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
![]() Join Date: Jul 2005 Location: Coffs H, Australia
Posts: 3,456
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Remove duplicate lines from data Hi all, Every so often i like to remove duplicate lines from a list of raw data, if you want to do this with php, here's a simple way to do so: PHP Code: -Rhett.
__________________ Free Forums / GoDaddy Coupon Codes (NEW DOMAIN!) / Free Arcade Script / <?='Your computer is '.(1?fine:broken).'.'?> |
| | |
| | #2 (permalink) |
| Tech Support Join Date: Mar 2005
Posts: 4,944
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | A simpler way ![]() ????: NamePros.com http://www.namepros.com/showthread.php?t=710519 PHP Code: |
| | |
| | #3 (permalink) |
| Domains my Dominion Join Date: Aug 2005 Location: Web 1.0
Posts: 9,955
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | If you have a file and you want to remove the dupes, you could invoke the linux command line through the shell_exec function if allowed on your host: Code: sort <your file> | uniq
__________________ NameNewsletter.com - free lists of available domain names ZoneFiles.net (beta) - ccTLD and gTLD droplists |
| | |
| | THREAD STARTER #4 (permalink) |
![]() Join Date: Jul 2005 Location: Coffs H, Australia
Posts: 3,456
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Thanks eric, i didn't realize there was an array_unique function, rep left .Thanks sdsinc, i was specifically referring to php
__________________ Free Forums / GoDaddy Coupon Codes (NEW DOMAIN!) / Free Arcade Script / <?='Your computer is '.(1?fine:broken).'.'?>
Last edited by BillyConnite; 04-11-2011 at 09:26 PM.
|
| | |
| | #5 (permalink) |
| NamePros Regular Join Date: Mar 2009
Posts: 540
![]() ![]() ![]() ![]() ![]() ![]() | Just wondering, are we talking about rewriting the file or just formatting for output (similar to select distinct in SQL)?
__________________ This is political opinionpoll.me | free recipes for drinks on your phone and tapforex.com for currency | energy meters digital archery | walletdeal | shopfor3d.com | casino cloud | mobilehealthcarestore | 3dfashionistas | e-bike.tv | carwallets.com | ebookreader |
| | |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help Please - Need Script to Find & Remove Duplicate Links from a web page. | senaia | Programming | 5 | 08-07-2006 01:55 PM |
| Dedicated Servers from just £45 $90 + [UK] 1 TB Data Transfer P4 3.0GHZ Only £119 | blackicehosting | Web Hosting Offers | 0 | 07-12-2005 06:24 PM |
| Unmetered Summer Savings + 10% Discount | blackicehosting | Web Hosting Offers | 0 | 07-02-2005 11:20 AM |
| New Site New Looks New Unmetered Savings | blackicehosting | Web Hosting Offers | 0 | 05-29-2005 02:58 PM |
| #1 Bring Power to your Hosting :: UK Redbus + LA Dedicated Servers | blackicehosting | Web Hosting Offers | 0 | 05-11-2005 10:57 AM |