-3

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" }

Dara FC
  • 3
  • 1
  • Your question is not completed enough to understand the problem. – Dinidu Hewage Nov 15 '17 at 03:23
  • Possible duplicate of [How does PHP 'foreach' actually work?](https://stackoverflow.com/questions/10057671/how-does-php-foreach-actually-work) – Naga Nov 15 '17 at 03:51

1 Answers1

3

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?

cpave3
  • 151
  • 3