@goldtaste It gets this error.
"class": "ErrorException",
"message": "json_decode() expects parameter 1 to be string, array given",
Right
dd($collection->first()["Attitude/Presentation: Generally positive attitude/focus on learning. Appropriate language, behavior, attire."]);
@sinnbeck I think that did it!
$q1 = $collection->avg([$professionalism_Q1]);
Gets
2.7142857142857
And I know how to clean that up.
Thank you so much!
Ok strange indeed
Totally different approach then.
Writing on a mobile so it might be off
$r = [];
$c = [];
foreach ($collection as $col) {
foreach ($col as $key => $q) {
if (isset($r[$key]) {
$r[$key] += $q;
$c[$key] += 1;
} else {
$r[$key] = $q;
$c[$key] = 1;
}
}
}
$f = [];
foreach ($r as $key => $rr) {
$f[$key] = $rr / $c[$key];
}
Yay great to hear. Just wrote a new suggestion but that one is alot cleaner :)
@sinnbeck Thanks again, truly appreciate the help in troubleshooting this issue.
Please or to participate in this conversation.