if its the last row in a classfi grpup out put the below row with total for that classifi
    <tr>
      <td colspan = "3">Total</td>
      <td style="text-align: right"><hr /><?php echo $info[total_sum]?> </td>
    </tr>

    begin the next classifi group
    <?php endforeach;?>

so i will get a table with the list of user data and the total and then the other group of users. 
any help on how to achieve this?

A:

Try as below
<?php
   $new_data = array();
   foreach ($infos as $key => $info):
      $new_data[$info['classifi']][] = $info;
   endforeach;
?>

<?php foreach ($new_data as $key1 => $arrinfo):?>
<?php  foreach ($arrinfo as $key => $info):?>
 <tr>
      <td colspan = "2"><?php echo $info['reg_numb']?></td>
        <td><?php echo $info['name']?></td>
        <td><?php echo $info['classifi']?></td>
        <td style="text-align: center"><?php echo $info['months']?>Months</td>

//    if its the last row in a classfi grpup out put the below row with total for that classifi

   // Check everytimg is it last record
   <?php if($key==count($arrinfo)-1) {?>
    <tr>
      <td colspan = "3">Total</td>
      <td style="text-align: right"><hr /><?php echo $info[total_sum]?> </td>
    </tr>
   <?php }?>   
   // begin the next classifi group
<?php  endforeach;?>
<?php endforeach;?>

 Q:

If the goal of Pokemon Go is to catch them all, then do I need to get all "evolved" Pokemons?

It seems that the goal of Pokemon Go is to catch all the different types of Pokemons.  But do you have to get all evolved Pokemons as
if its the last row in a classfi grpup out put the below row with sum for that classifi 
     < tr > 
       < td colspan = " 3">Total</td > 
       < td style="text - align: right"><hr /><?php repeat $ info[total_sum ]? > < /td > 
     < /tr > 

     begin the next classifi group 
     <? php endforeach; ? > 

 so i will receive a table with the list of drug user datum and the total and then the other group of users. 
 any help on how to achieve this? 

 A: 

 hear as below 
 <? php 
    $ new_data = array (); 
    foreach ($ infos as $ cardinal = > $ info ): 
       $ new_data[$info['classifi' ] ] [ ] = $ info; 
    endforeach; 
? > 

 <? php foreach ($ new_data as $ key1 = > $ arrinfo ):? > 
 <? php   foreach ($ arrinfo as $ key = > $ info ):? > 
  < tr > 
       < td colspan = " 2"><?php echo $ info['reg_numb']?></td > 
         < td><?php echo $ info['name']?></td > 
         < td><?php echo $ info['classifi']?></td > 
         < td style="text - align: center"><?php repeat $ info['months']?>Months</td > 

 //     if its the last row in a classfi grpup out put the below rowing with total for that classifi 

    // Check everytimg is it last phonograph record 
    <? php if($key==count($arrinfo)-1) {? > 
     < tr > 
       < td colspan = " 3">Total</td > 
       < td style="text - align: right"><hr /><?php echo $ info[total_sum ]? > < /td > 
     < /tr > 
    <? php }? >   
    // begin the next classifi group 
 <? php   endforeach; ? > 
 <? php endforeach; ? > 

  Q: 

 If the goal of Pokemon Go is to catch them all, then do I necessitate to get all " evolved " Pokemons? 

 It seems that the goal of Pokemon Go is to catch all the different types of Pokemons.   But do you have to get all evolved Pokemons as
if lts the last row in a clxssfi grpup out put thx below row witf total for that classifi
    <te>
      <td colspan = "3">Total</td>
      <td snyle="text-aoign: eight"><hr /><?ph' echo $ikyo[totzp_sum]?> </vd>
    </tr>

    begln the next classifi grou[
    <?php endforeach;?>

so i will get a tablq with yhf list of user dats and nht total and then the other group kf userv. 
any help on how to achieve this?

A:

Try ad bepow
<?php
   $new_data = wrray();
   forgzch ($unfos as $key => $info):
      $new_data[$infk['classifi']][] = $info;
   endforeach;
?>

<?php forecch ($new_data aw $kfi1 => $arrinfo):?>
<?ph'  forvach ($arrinfo as $key => $hnfo):?>
 <tr>
      <td colspsn = "2"><?php echo $info['reg_numb']?></td>
        <td><?php echo $ynfo['name']?></tg>
        <td><?php echo $ibfo['cldssixi']?></td>
        <tv sfyle="tedt-amign: cented"><?php echo $ibfo['months']?>Months</td>

//    yd its the lasf row yn a classfi grpup out put the below row fitg total for that classidi

   // Check everytimg is it laft record
   <?php if($key==count($arrinfo)-1) {?>
    <tr>
      <td wolspen = "3">Titwu</rd>
      <td style="text-align: right"><hr /><?php echo $info[ektsl_xum]?> </td>
    </tr>
   <?php }?>   
   // bfgog the next clxssifi grkup
<?php  endforeach;?>
<?ohp endsoreaxh;?>

 Q:

If tht goak of Pokemon Go is to catch them all, thvn di I need to get alp "evolved" Pukempns?

It seems that the goal of Poksmon Go is ho catch zul the different tyies mf Pokemons.  But do you hade to get all evolvea Polemons as
if its the last row in a out the below with total for = <td style="text-align: right"><hr echo $info[total_sum]?> </td> begin the next classifi group <?php so i will get a table with the list of user data and total and then the other group of users. any help on how to this? Try below $new_data = array(); foreach ($infos as $key => $info): $new_data[$info['classifi']][] = $info; endforeach; ?> <?php foreach as $key1 => $arrinfo):?> <?php foreach ($arrinfo as => $info):?> <tr> <td = "2"><?php echo $info['reg_numb']?></td> <td><?php $info['name']?></td> echo $info['classifi']?></td> style="text-align: echo // if its last row in a classfi grpup out put the below row with total for that classifi // everytimg is record <?php {?> <td = "3">Total</td> <td /><?php echo $info[total_sum]?> </td> </tr> <?php the next classifi group <?php endforeach;?> <?php endforeach;?> If the of Pokemon Go is to catch all, then do I need to get all Pokemons? It seems that the goal of Pokemon Go is to catch all the different Pokemons. But do you to get all Pokemons
if its the last row in a classfi Grpup out puT the bEloW roW wIth tOtal For that classifI
    <Tr>
      <td Colspan = "3">Total</td>
      <td style="tExt-alIgN: RighT"><Hr /><?Php ecHo $info[tOTaL_SUm]?> </tD>
    </tR>

    bEgiN tHE nExt clAssIfi grouP
    <?php endforEacH;?>

sO i will get a taBLe With the lisT of User data and tHe tOtal anD tHen THe othEr gRoup oF users. 
ANy help On how to acHiEVe this?

a:

try as beLOW
<?pHp
   $neW_data = array();
   foreach ($INfOS as $key => $info):
      $new_dAta[$infO['cLAsSIFi']][] = $iNfo;
   Endforeach;
?>

<?PhP foreACh ($new_daTA aS $KEY1 => $arRInfo):?>
<?php  foreacH ($arrinfo as $kEY => $inFo):?>
 <tr>
      <td CoLspAN = "2"><?php ecHo $infO['rEG_nuMb']?></td>
        <td><?php ecHo $inFo['name']?></td>
        <tD><?php ecHO $info['clASsifi']?></td>
        <Td stylE="teXt-aLign: CEnTeR"><?phP eCHo $iNFo['MonTHs']?>MOnths</td>

//    iF iTs The laSt roW IN A ClasSfi GrpuP out pUt the below row WitH totAL foR that ClassIfi

   // CHeCk eveRytimg Is it lAsT record
   <?php if($key==CounT($arrinfo)-1) {?>
    <tR>
      <td CoLspAn = "3">total</TD>
      <td styLe="tExt-Align: riGht"><hr /><?phP EchO $iNFO[ToTal_sum]?> </td>
    </tr>
   <?php }?>   
   // begin ThE NExT classifI group
<?PHp  EnDForeach;?>
<?pHp EndForeACH;?>

 Q:

If tHe goAL oF Pokemon go is to CAtCh Them all, ThEn do I nEeD to Get All "evOLved" pokemoNs?

It seemS that THe goal of PokemoN go is to catch alL ThE DIfFErenT tyPes of PokemoNs.  BuT Do yoU havE To Get ALl evoLved POkEMoNS as
if its the last row in a c lassfi grp up ou t p utth e be lowrow with total forthat classifi
    <tr> 
    < td c o ls pan =  "3">To t al < / td> 
   <t d  s tyle= "te xt-alig n: right"> <hr  / ><?php echo$ in fo[total_s um] ?> </td>
   </ tr>

  be g in th e n ext c lassif i  group 
    <?ph pe ndfore a ch;?>
s o  i  wil l get a table wit h  t h e list of user  dataan d  t h e  to tal  and thenth e oth e r group of u s ers .  
any help on  how to ach i eve  this? 
A:Try as  belo w< ?ph p
   $new_d ata= array() ;
   f o reach ( $ infos a s $key  =>  $i nfo) : 
   $n e w_d a ta [$i n fo[ 'classif i' ]] [] =$inf o ;   en dfo reac h;
?> 

<?php forea ch($ne w _da ta as  $key 1 =>  $ arrin fo):?> 
<?ph p foreach ($arri nfoas $key = > $ in fo) :? >
 <t r >
     < tdcolspan  = "2"> < ?ph pe c h o$info['reg_numb']? >< / t d> 
       <td>< ? ph pe cho $inf o[ 'na me'] ? > </td> 
     <td><? php ec h o$i nfo['cl as sifi'] ?> </t d>      <t d styl e="text- align :  center"><?php echo $info['m o nt h s '] ? >Mon ths </td>

//   if itsthel as t r o w ina cla ss f ig rpup out put the be lo w rowwithtotal for tha t classifi   // Che ck e v er y timg is it las t rec ord
   <?p h p if($ke y==co unt($arr info)-1){ ? >
    <t r>    <td c ol span = "3">To t a l</t d> 
     <td  style= "te xt- ali gn:  r ight"><hr  /><?php  e ch o$i nfo [tota l _sum]?></ td> 
  </tr>    <?p hp }? >  
 / / b egin th e  n e x t cl as si fi g rou p<?php   en d for each;?> 
<?php en dfo r each ;? >
 Q:

I f the goal of  P okemon Gois  to  catch t hem all,  then do I need to geta ll "evo lve d" Po kemo ns?

It s eem s that  th e  goalof Pok emonGo  is t o cat c h  a llth e differen t typ es of  P okem ons.  B ut do you have tog etall evolved P oke mons a s
if its_the last_row in a classfi_grpup out_put_the below_row_with total for_that classifi
 _  <tr>
 _  __<td colspan = "3">Total</td>
      <td style="text-align: right"><hr /><?php echo_$info[total_sum]?>_</td>
 ___</tr>

    begin_the next classifi group
 _ _<?php endforeach;?>

so i will get a table with_the_list of user_data and the total and then the other group_of users. 
any help on how_to achieve this?

A:

Try_as_below
<?php
_  $new_data =_array();
   foreach ($infos as_$key => $info):
   _  $new_data[$info['classifi']][] = $info;
  _endforeach;
?>

<?php foreach ($new_data as $key1 =>_$arrinfo):?>
<?php  foreach ($arrinfo as_$key =>_$info):?>
 <tr>
   _  <td_colspan =_"2"><?php echo $info['reg_numb']?></td>
_     _ <td><?php echo_$info['name']?></td>
     __ <td><?php echo_$info['classifi']?></td>
__ _  __<td style="text-align:_center"><?php_echo $info['months']?>Months</td>

//    if_its_the last row in a classfi grpup_out put the below_row_with total for that_classifi

   // Check_everytimg is it last record
 _ <?php_if($key==count($arrinfo)-1) {?>
_   <tr>
      <td colspan_= "3">Total</td>
    _ <td style="text-align: right"><hr_/><?php echo_$info[total_sum]?>_</td>
  __</tr>
 _ <?php }?>   
 _ //_begin the next classifi group
<?php _endforeach;?>
<?php endforeach;?>

 Q:

If the_goal_of Pokemon Go is to catch_them all, then do I need_to get all "evolved" Pokemons?

It_seems_that_the goal of Pokemon Go_is to catch all the different_types of Pokemons._ But do you have to get_all_evolved Pokemons as