dimanche 3 septembre 2017

Issue with for loop in PHP for grouping same elements in an array as one

I get some data in an associated array, see image for data,

enter image description here

Here I want to group all elements with party value. Each array may have different party name but arrays with a similar party to be grouped and displayed in the page.

What I tried is, Here I can successfully separate golaRate and rate, but I need specific party name for golaRate and rate

@foreach($data as $bill_data)
        @if(!$bill_data['golaRate'])
             --> this the problem here

@foreach($data as $bill_data)
        @if(!$bill_data['rate'])
            

am using laravel framework.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire