0

I have 2 variables as below both having the same length of integers:

$var1 = 2016-08-03

$var2 = 2016-21-23

Basically, I need to compare both of them as below:

Step1: compare 2 from $var1 to 2 from $var2
both are same. proceed
Step2: compare 0 from $var1 to 0 from $var2
both are same. proceed
Step3: compare 1 from $var1 to 1 from $var2
both are same. proceed
Step4: compare 6 from $var1 to 6 from $var2
both are same. proceed
Step5: compare - from $var1 to - from $var2
both are same. proceed
Step6: compare 0 from $var1 to 2 from $var2
Result: $var2 is greater
Maddy
  • 53
  • 8

0 Answers0