Hello I have array like this, can you help me how to foreach to view.
array(2) { [0]=> string(1) "2" [1]=> string(2) "19" }
Hello I have array like this, can you help me how to foreach to view.
array(2) { [0]=> string(1) "2" [1]=> string(2) "19" }
If you have an array like this:
$array = ["2", "19"];
You can view it using the blade template engine like so:
@foreach($array as $item)
{{$item}}
@endforeach
If you just want to access it in normal PHP though it would be like:
foreach($array as $item) {
echo $item;
// or whatever you want to do with the information here
}
Is this what you are trying to do?