Latest

Thursday, July 6, 2017

foreach loop count function total

Asked by: Mathieu Mourareau


I would like to make a total count on my variable : $nb_quota_lic_simples

In the foreach i check how many free licences i have, i would like to get the total of the licences if there is many equipes. Hope someone help me. Thanks a lot in advance !

Actually i have :

foreach ($equipes as $equipe) {
    $nb_quota_lic_simples = $equipe->catg_equipe->nb_licences;               
}
dd($nb_quota_lic_simples);


Source

No comments:

Post a Comment

Adbox