12-25-2022, 12:08 PM
buenas, estoy intentando adaptar este código
A mi codigo
en la parte donde dice //aqui
pero no logro hacerlo funcionar
Código PHP:
'.(number_format($time_pug_game / 60) >= 60 ? number_format(number_format($time_pug_game / 60) / 60) : number_format($time_pug_game / 60)).' '.(number_format($time_pug_game / 60) >= 60 ? "Hora" : " Minutos").'';
if (number_format($time_pug_game / 60) > 60) echo ' y '.(number_format($time_pug_game / 60)-60).' Minutos';
A mi codigo
Código PHP:
while($pug_history = $query->fetch_array(MYSQLI_ASSOC))
{
$time_dif = 4 * 3600;
$time = $pug_history['pug_end_fecha'] - $time_dif;
$time_pug_game = ($pug_history['pug_end_fecha'] - $pug_history['pug_in_fecha']);
$fecha = date('m/d/Y - h:i:s A', $time);
if(($pug_history["pug_history"] % 2) == 0)
{
?>
<tr onclick="DisplayBetado(<?php echo $pug_history['pug_history']?>)" class="tr_2">
<td class="hash">
#<?php echo $pug_history["pug_hash"] ?>
</td>
<td>
<?php echo $pug_history["pug_svname"] ?>
</td>
<td>
<?php echo $fecha ?>
</td>
<td>
//aqui
</td>
</tr>
<?php }
else
{
?>
<tr onclick="DisplayBetado(<?php echo $pug_history['pug_history']?>)" class="tr_1">
<td class="hash">
#<?php echo $pug_history["pug_hash"] ?>
</td>
<td>
<?php echo $pug_history["pug_svname"] ?>
</td>
<td>
<?php echo $fecha ?>
</td>
<td>
//aqui
</td>
</tr>
<?php }
} ?>
en la parte donde dice //aqui
pero no logro hacerlo funcionar