0

I'm trying to display an average result from the database to the view but I keep getting this error:

A PHP Error was encountered
Severity: Warning
Message: Invalid argument supplied for foreach()
Filename: kmeans/pengelompokan_v.php
Line Number: 228

Backtrace:
File: C:\xampp5.6\htdocs\skripsi\application\views\kmeans\pengelompokan_v.php
Line: 228
Function: _error_handler
File: C:\xampp5.6\htdocs\skripsi\application\libraries\Layouts.php
Line: 15
Function: view

File: C:\xampp5.6\htdocs\skripsi\application\controllers\Pengelompokan.php
Line: 27
Function: load
File: C:\xampp5.6\htdocs\skripsi\index.php
Line: 315 Function: require_once

And

A PHP Error was encountered
Severity: Warning
Message: Message: Array to string conversion
Filename: database/DB_query_builder.php
Line Number: 2442
Backtrace:
File: C:\xampp5.6\htdocs\skripsi\application\models\Datamining_m.php
Line: 31
Function: get
File: C:\xampp5.6\htdocs\skripsi\application\controllers\Pengelompokan.php
Line: 17
Function: by_year
File: C:\xampp5.6\htdocs\skripsi\index.php
Line: 315
Function: require_once

controller

view

model

Community
  • 1
  • 1
  • 1
    Please don't just ask us to solve the problem for you. Show us how you tried to solve the problem yourself, then show us exactly what the result was, and tell us why you feel it didn't work. Give us a **clear explanation of what isn't working** and provide [a Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve). Read [How to Ask](http://stackoverflow.com/help/how-to-ask) a good question. Be sure to [take the tour](http://stackoverflow.com/tour) and read [this](https://meta.stackoverflow.com/q/347937/1011527). – Jay Blanchard Jun 04 '20 at 17:05
  • 1
    Don't post pics of code, post your actual code here. – Jay Blanchard Jun 04 '20 at 17:06

0 Answers0