Solution 1 :

First your condition for loop is wrong, it should be as below:

Your condition for loop:

@for ($i = 1; $i >= 50; $i++)
  <option value=" . $i . " {{ old('numberplate') == $i ? 'selected' : '' }} 
  >Parkeervak- nummer $i</option>
@endfor

It should be:

@for ($i = 1; $i <= 50; $i++)
  <option value=" {{ $i }} " {{ old('numberplate') == $i ? 'selected' : '' }} 
  >Parkeervak- nummer {{$i}}</option> //You must put variable in {{variable}}
@endfor

Hope this will be helpful.

Problem :

I want to make a forloop for parkingplacenumber

<select name="numberplate" class="form-control">
                                                @for ($i = 1; $i >= 50; $i++)
                                                <option value=" . $i . " {{ old('numberplate') == $i ? 'selected' : '' }} >Parkeervak- nummer $i</option>
                                                @endfor
                                            </select>

But on the HTML it stays empty.

Thanks ALready

Comments

Comment posted by miken32

What do you think

By