PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
potato
Forum Contributor
Posts: 192 Joined: Tue Mar 16, 2004 8:30 am
Location: my lovely trailer, next to the big tree
Post
by potato » Fri Sep 17, 2004 4:11 am
Hi,
long time no see
!
For a star rating script, i have to cut off everything behind the comma, like:
4.333 would be 4.
Anybody knows how to do it?
Thanx in advance!
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Fri Sep 17, 2004 4:12 am
potato
Forum Contributor
Posts: 192 Joined: Tue Mar 16, 2004 8:30 am
Location: my lovely trailer, next to the big tree
Post
by potato » Fri Sep 17, 2004 4:26 am
Thanx man!
I reall like this forum, specially for the fast answers.
That's how it should be.
devnetwork rulez
John Cartwright
Site Admin
Posts: 11470 Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:
Post
by John Cartwright » Fri Sep 17, 2004 6:18 am
if you want to round it [php_man]ceil()[/php_man] up
dethron
Forum Contributor
Posts: 370 Joined: Sat Apr 27, 2002 11:39 am
Location: Istanbul
Post
by dethron » Fri Sep 17, 2004 6:21 am
and do not forget [php_man]floor()[/php_man]