[PHP] Dividing too integers...

2001-10-19 Thread Seb Frost
Sorry for the stupid question... I want to do $this=$foo/$bar; (All are integers.) where this is always rounded up. I tried the obvious $this = ceil($foo/$bar) but I just always get 0. cheers, - seb --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system

Re: [PHP] Dividing too integers...

2001-10-19 Thread Richard Baskett
I don't see why that doesnt work... I would echo your values first to make sure the values you want in $foo and $bar are the right ones... It looks to me that your expression is correct... Rick Sorry for the stupid question... I want to do $this=$foo/$bar; (All are integers.)

RE: [PHP] Dividing too integers...

2001-10-19 Thread Seb Frost
Cheers Rich! I had $numrows instead of $num_rows - Doh! I said too instead of two - double Doh! - seb -Original Message- From: Richard Baskett [mailto:[EMAIL PROTECTED]] Sent: 19 October 2001 11:30 To: Seb Frost; PHP General Subject: Re: [PHP] Dividing too integers... I don't see

Re: [PHP] Dividing too integers...

2001-10-19 Thread R'twick Niceorgaw
try this.. $temp = ($foo%$bar); $this=$temp/$bar; - Original Message - From: Seb Frost [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, October 19, 2001 6:20 AM Subject: [PHP] Dividing too integers... Sorry for the stupid question... I want to do $this=$foo/$bar; (All