Php – Foreach of sum value with condition always increment
I have a test for my final course. I made some function but it stuck on sum of value array. I call the data from MySQL $stmt = $conn->prepare("SELECT r.id,id_penyakit,nama_penyakit,id_puskesmas,nama_puskesmas,created_at FROM riwayat r WHERE id_puskesmas = :id_puskesmas"); $stmt->bindValue(':id_puskesmas', $page_cat); $stmt->execute();…