txtjandatum, txtjanactiviteit, txtjanwaar and txtjanuur fields' names should be like txtjandatum[] ... This makes input field an array. Then Input::get('txtjandatum') will return an array contains all txtjandatum values by row order.
Thanks for the reply. Then how should those fields be named :
txtjandatum[] OR txtjandatum$i[] ($i representing the number)
and do i use the 'get' in the same file as the input fields or in the next one?
Just txtjandatum[]. Default array index will give you the row number. (Starts with zero)
$jandatum = Input::get('txtjandatum');
// $jandatum[0] returns value of the field in first row
// $jandatum[1] returns value of the field in second row
// ...
foreach($jandatum as $rowNumber => $inputValue) {
// do something with $rowNumber and $inputValue
}
Thanks for the advice, I used your idea to use array's. It would't work, so i tweaked it a bit and now it does work! Thanks for the help ;-)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community