ereg() or better way of rounding off?
Posted: Thu Jan 02, 2003 3:05 pm
Okay, here's the deal--ya'll might remember me, I was here a long as time ago, been away learning PHP--anyways, I am almost finished what I have been working on, but I need to either figure out how to use ereg() or is there another way to round off a number?
Basically say I have a number like pi
3.14652642 <-- Not quite, but close.
I want to -always- round it up. So I need it to hit 4 - what'd I do?
Now my major problem--at least in my head--is that, I don't understand ereg() - and the rounding needs to take place in a certain file--like user_info.php--so... does this make sense, and can anyone explain to me what i should do?
Basically say I have a number like pi
3.14652642 <-- Not quite, but close.
I want to -always- round it up. So I need it to hit 4 - what'd I do?
Now my major problem--at least in my head--is that, I don't understand ereg() - and the rounding needs to take place in a certain file--like user_info.php--so... does this make sense, and can anyone explain to me what i should do?