Jump to content

Search the Community

Showing results for tags 'duplicate id'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Hi, I have the following array and would like to loop through it and check if there are duplicate catalogIDs, if yes, I would like to compare the dates and choose the earliest date. In the following array: catalogID 1257 is there two times. I need earliest date, which is 2013-09-03 catalogID 1340 is there three times. I need earliest date, which is 2013-09-04 Array ( [0] => 1159, 2013-09-03 [1] => 1157, 2013-09-03 [2] => 1257, 2013-09-03 [3] => 1257, 2013-09-13 [4] => 1340, 2013-09-04 [5] => 1335, 2013-09-03 [6] => 1340, 2013-09-13 [7] => 1410, 2013-09-03 [8] => 1340, 2013-09-18 ) Is it easier to add all the unique catalogIDs with the earliest date to a new array or remove the duplicate catalogIDs with the late dates from the current array? I have tried a foreach loop and a for loop with counter but I'm not able to do this. Any ideas? Thanks!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.