5
i created a table, where I put the user record on a card for printing; therefore this table has several records (5 per page) and so in each page I access a record in the same table I did an array_push with the values -->
$sql = mysql_query("SELECT * FROM cartao LIMIT $inicial, $numreg ");
$sql_conta = mysql_query("SELECT * FROM cartao ");
$quantreg = mysql_num_rows($sql_conta);
$Nascimento = array();
$Batismo = array();
$Comunhao = array();
$Emissao = array();
while($linha = mysql_fetch_array($sql_conta, MYSQL_ASSOC)){;
array_push($Nascimento, $linha['Nascimento']);
array_push($Batismo, $linha['Batismo']);
array_push($Comunhao, $linha['Comunhao']);
array_push($Emissao, $linha['Emissao']);
}if ($_GET['pag'] > 0 ){
$pegaid = (int) $_GET['pag'];
$id = "$pegaid";
$soma = $id * 5 ;
}
Inside the Table I pull the data from the record that comes out in format ('yyyy/mm/dd') the table works like this:
td height="42"><a>Nascimento:</a>
<?php
echo '<b>';
if ($_GET['pag'] > 0 ){
print $Nascimento[0 + $soma];
}else{
print $Nascimento[0];
}
echo '</b>';
?>
</td>
I wanted to KNOW how to invert the format without giving problem in the rest of the code the other records I took for finding without importance. OBS:. All records there are dates; The record issue is an automatic record!!! Some help.
Related question
– Kazzkiq