Getting weird undefined foreach error in Laravel Blade
I'm working with Laravel 5.8 and I have this syntax: @php($counter_foreach = 0) @foreach($memnames as $mem=>$memname) @php @endphp @endforeach Now when I run this, I get syntax error, unexpected 'endforeach' (T_ENDFOREACH) error: But when I remove @php @endphp, and replace…