Where does $data come from?

On May 22, 3:22 pm, Ming <[EMAIL PROTECTED]> wrote:
> Hi folks,
>
> Could you please help me understand codes below? It is in a model
> named Course
>
> Many thanks,
>
>         function prepData($data=null){
>           if (empty($data['data']['Course']['record_status'])) {
>                 $data['data']['Course']['record_status'] = $data['form']
> ['record_status'];
>         }
>
>                 if( !empty($data['form']['self_enroll']))
>                         $data['data']['Course']['self_enroll'] = "on";
>                 else
>                         $data['data']['Course']['self_enroll'] = "off";
>
>                 for( $i=1; $i<=$data['data']['Course']['count']; $i++ ){
>                         $data['data']['Course']['instructor_id'.$i] = 
> isset($data['form']
> ['instructor_id'.$i])? $data['form']['instructor_id'.$i] : '';
>                 }
>
>                 return $data;
>         }


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to