mardi 8 novembre 2016

Output Laravel Array Key List

I have the following when return my variable $data;

{
"Test Location":
[{"name":"Kieran","round":"Test Location"},{"name":"Jordan","round":"Test Location"}],
"Location 2":
[{"name":"Paul Sample","round":"Location 2"}]
}

How would I output the unique key which in this example is

  • Test Location
  • Location 2

I've tried

<ul>
                    @foreach($rounds as $r => $name)
                        <li></li>
                    @endforeach
                </ul>

But that gives me the data within the key.

Hope I'm making sense.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire