I'm getting the error "Fatal error: Cannot use object of type stdClass as array in" on line 37 which happens to be
public function getMatkul1(){
$matkul = $this->rest->get('ambilmk', 'json');
foreach ($matkul as $key => $value) {
if(($value['semester'] % 2 ) == $semester){
echo '<option value='.$value['kmk'].'>'.$value['mk'].'</option>';
}
}
}
Anyone know what's wrong with the above code? Or what this error means?
$value.print_r($value)and see what you have there.