Re: Numeric help needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jason,

I've tried lots of different things, including:

 echo "<br>" . round(68500, 1000) . " ROUNDED";

thinking that might be it, but i'm stumped

This is the example I was given (And have to go by):

"If the loan amount is $68500.00, the insurace will be based on
$69000.00 as the amount is always rounded up to the next $1000."

Maybe i'm just looking at it wrong but i'm stumped.

Chris


On Sun, Jan 15, 2012 at 8:41 PM, Jason Pruim <lists@xxxxxxxxxxxxxxxxxxxx> wrote:
>
>
> Sent from my iPhone
>
> On Jan 15, 2012, at 8:25 PM, "Christopher J Payne" <oxygenet32@xxxxxxxxx> wrote:
>
>> Hi everyone,
>>
>>
>>
>> I am having a hard time with a numerical problem.
>>
>>
>>
>> I need to round some numbers up and I've tried $round($number) and it
>> doesn't work so I'm misunderstanding something.
>>
>>
>>
>> For example, if a user inputs 685000 I need it to round up to 690000 or if
>> they input 149560 I need it to round up to 150000.  What is the correct way
>> to do this as everything I have tried doesn't seem to affect the user
>> inputted figure at all.
>>
>>
>>
>> Anyway help would REALLY be appreciated, I'm sure it's really simple but for
>> the life of me I'm stumped on why it's not working.
>>
>
> Maybe it's just a typo in your email but you put a $ infront of round() try removing that and see if it helps. If not are there any error messages that are showing up?
>>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux