0
I need a help to know how many equal dates for PHP to present me with a number count, for example, "3 dates are equal", what I have of code so far is this:
$hoje = '2018-07-02';
$datafinal = '2018-07-02';
if(strtotime($hoje) == strtotime($datafinal){
}
How many dates are equal??? you have one
array
??? or only this code?– novic
I’m taking it from the database and comparing it to the
date(Y-m-d)
ofphp
– João Victor
if it doesn’t make a group by?
– novic
You can take this direct count from the bank, it is more practical and will probably have greater performance. Making a query that returns the number of equal dates
– David Alves
I’ll try, any doubt I’ll come back here.
– João Victor