Welcome Guest, Not a member yet? Register   Sign In
Multidimensional arrays
#4

[eluser]Todlerone[/eluser]
Hello again...I can't seem to see the problem with this but I keep getting the error
Invalid argument supplied for foreach()
. It occurs on the line with
Code:
foreach ($treatplan as $tp):

Code:
foreach ($pstatus as $ps):
                $cvnum= $ps['clinic_visit_id'];
                $treatplan = $this->Fractions_model->get_treatandplan_where($cvnum);
                foreach ($treatplan as $tp):
                    if ($ps['plans_plan_name'] == $tp['plans_plan_name']){
                        foreach ($data['regions'] as $r):
                            if ($tp['treat_region'] == $r['name']){
                                $data["total_".$r['name']."_treats"] += 1;
                                $monthNUM = date("m", strtotime($ps['plan_status_started_plan_date']));
                                $yearNUM = date("y", strtotime($ps['plan_status_started_plan_date']));
                                $courseMONTH[$monthNUM.$yearNUM][$r['name']] +=1;
                            }
                        endforeach;
                    }
                endforeach;
            endforeach;

I get the result I want but I also get the warning????

TY


Messages In This Thread
Multidimensional arrays - by El Forum - 07-07-2011, 10:53 AM
Multidimensional arrays - by El Forum - 07-07-2011, 10:59 AM
Multidimensional arrays - by El Forum - 07-07-2011, 01:11 PM
Multidimensional arrays - by El Forum - 07-07-2011, 02:35 PM
Multidimensional arrays - by El Forum - 07-07-2011, 03:30 PM
Multidimensional arrays - by El Forum - 07-07-2011, 03:59 PM
Multidimensional arrays - by El Forum - 07-08-2011, 09:02 AM



Theme © iAndrew 2016 - Forum software by © MyBB