i am working in cakephp1.2

**************************************************************************Model
Code***********************************************************************************
my view code is like this


$i=0;
foreach($rows as row)
{
    $i++
    echo $form->submit('Modelname.name'.
$i,array('labe'=>'labelname','error'=>'lengtĀ­h
should be less than 20 characters'));
}

************************************************************************Model
Code**********************************************************************************


i used $i in the name becuse i am taking five name from user to enter
at one time

so for five differnt name i need different naming eg. [modelname][name
1],[modelname][name 2].........[modelname][name n]

*********************************************************************Controller
Code*****************************************************************************
in my model code validation is like this

var $validate = array(*'name*' => array('error' => array('maxLength',
20)));

***********************************************************************Controller
Code********************************************************************************
now problem comes in name it should be like 'name'.$i


but it gives error to 'foreach loop' when running in model


i want to use this inbuilt function


plz help me to sort out this issue THANKS IN ADVANCE


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to