note 60903 deleted from function.floor by nlopess
| From: | nlopess@php.net | Date: | Thu, 19 Jan 2006 22:28:49 +0000 |
| Subject: | note 60903 deleted from function.floor by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-102117@lists.php.net to get a copy of this message | ||
Note Submitter: gabriel at meusfavoritos dot net
Reason: non-english
----
Usei o floor em minha enquete,
mas ai a conta das porcentagens nao fica certinha.
ai usei o ceil() tb.
<table width="300" border="0" cellspacing="0"
cellpadding="8">
<tr>
<td colspan="2"
bgcolor="#E4E4E4"><strong>Sexo</strong></td>
</tr>
<tr>
<td width="202" bgcolor="#F4F4F4">Masculino</td>
<td width="78" bgcolor="#E4E4E4"><?= $masculino; ?>
(<?= ceil(($masculino * 100)/$total); ?>%) </td>
</tr>
<tr>
<td bgcolor="#F4F4F4">Feminino</td>
<td bgcolor="#E4E4E4"><?= $feminino; ?> (<?=
floor(($feminino * 100)/$total); ?>%) </td>
</tr>
</table>