-2
I’m using php 5.3 with Postgree on a project I’m working on.
That way I have to use the array() and not the [ ].
I have a table that I need to send by email but when sending only the last record is coming.
I need to send this table by e-mail with all lines.
I am trying to pass the values of the variable to an array but it shows all values in the Index, zero as image.
I am using a while. I would like to fix this without changing the current structure that is by while and not by for.

    $c = 0;
       while ($row = pg_fetch_array($res))                          
    {
      $c++;
    $sql1 = "
    select a.aux_nomecompltaxon from jabot.testemunho t,jabot.arvoretaxon a,jabot.determinacao d
    where a.codarvtaxon = d.codarvtaxon
    and d.coddeterminacao = t.ultimadeterm
    and t.codtestemunho = '".$row['codtestemunho']."'
    ";
    $res1 = pg_exec($conn,$sql1);
    $determinacao = pg_fetch_array($res1);
    ?>
    <tr>
        <td> 
            <input type="checkbox" name="iditemguiaremessa[]" id="iditemguiaremessa" value="<?php echo $row["iditemguiaremessa"];?>" />
        </td>
    <td> 
        <?php echo $c;?>
    </td>
        <td> 
          <?php                                 
    $array = array(
    $row['codtestemunho'] ,
    );
    print_r($array);
    ?>                                    
    <input type="hidden" name="edtcodigobarra" value="<?php echo $array[0]; ?>" >
    </td>
   }
						
Your question is very confusing and has no scope. I couldn’t identify what the problem is. What do you want to do? Do you want to re-negotiate the
array? Want to send an email?– CypherPotato
Thanks for the Feedback. I will edit to make it clear.
– fabricio_wm
See if it looks better, @Cypherpotato?
– fabricio_wm
What is the structure of this
$res? Puts thevar_dumpof it for us to see.– CypherPotato