Jump to content

how do i explode a round?


Monkuar

Recommended Posts

$newrating = round($imageinfo['rating'],2);

 

this outputs:

 

4.49

 

in my db rating is

 

4.4884

 

 

all i need is the 4.... would i use some type of preg_replace or something just to grab the first 1 before the decimal? (all  i need is the first number before the decimal)

Link to comment
https://forums.phpfreaks.com/topic/259383-how-do-i-explode-a-round/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.