-2
I want to transform the value returned from a sum, formatted without point(.) or comma characters(,)
$valor
comes from a POST, the following sum is made:
echo $porcent * ceil($valor);
The above code returns me the following value 99.99 or higher 999.99 I believe, hence I want this value to return 9999 no semicolon. I’m tapping the coconut and I get no result.
Follows the code.
<?php $valor = $_POST['valor']; $porcent = $_POST['porcent'] / 100; ?>
</head>
<body>
<span style="width:40px" class="text-muted"><?php echo $porcent * ceil($valor); ?></span>
Give numerical example, who is $percent and who is $value
– user60252
If you are multiplying an integer given by the Ceil function by a noninteger value it is evident that this can result in a noninteger number. do
echo ceil($porcent * $valor);
– user60252
What values are you going through the POST for
valor
andporcent
?– bfavaretto