troubleshooting Question

How can I get two dates to be compared to one another in the context of a loop?

Avatar of Bruce Gust
Bruce GustFlag for United States of America asked on
4 Comments1 Solution184 ViewsLast Modified:
How would I compare two dates in the context of a loop?

I've got a table full of duplicates. I've been able to craft a foreach loop that accurately retrieves and displays duplicate values. But then, when I've got two duplicates to consider, I need to compare the dates and be able to give the user the opportunity to click a button that will delete the date that is the oldest.

I'm coming up short.

Here's what I've been trying:

foreach($current_list as $current)
		//I've got a duplicate
				echo "a rebel yell";
				echo "say nothing";

It's not working. I've tried several different configurations and I'm ooen to suggests.

Any ideas?
Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros