Hello, I have the following code.
foreach ($tickets->list as $key => $val) :
$data_fecha = date("Y-m-d",strtotime($val->data['fec_Emision']['valor']));
if($data_fecha == $data_fecha){
echo "se repite";
}
print_r("<pre>");
print_r($data_fecha);
print_r("</pre>");
endforeach;
The output is the following:
Of course it reaches today's current date which is 17.
And well what I want to achieve is that every time the date is repeated, I want the others to be eliminated and only one date remains for each query that is made
The query I make is simple and is as follows:
SELECT * FROM ticket WHERE `fec_Emision` >= '2022-10-00' AND `fec_Emision` <= '2022-11-00'ORDER BY `fec_Emision` ASC
And well what I want at the end of all this is that in my ChartJs bar chart it shows me day by day as in the following chart.
And the output I currently have is this
AID!