May I ask where does $data come from, what does it mean?
Thanks
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 [email protected]
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
-~----------~----~----~----~------~----~------~--~---