Numbers :-<

Started on the old forum in May 2009 · view the original in the archive · old links redirect here

4 replies · 535 views · started 17 years ago · 1 min read

4 participants
i0nutzxp Developer · 150 posts #1

hi friend .... sorry for wanting help ..but its the last time ..bcoz i dont work whit numb. very much ...u dont k the next thing:

for ex: $extractnumber = ......... $number = $extractnumber \ 4 ;

ex : $number = 9 \ 4;

$number = 2,25

i want it like this : 2 and 0,25 (separated) not 2,25 (=2+0.25)

thx

<?php unlink('World/Europe/Romania.country'); ?>
GumSlone Administrator Principal · 1,690 posts #3

something like this will work:

$number = 9 / 4; $number_before_coma = intval($number); $number_after_coma = $number - $number_before_coma;

Advertise your mobile site for FREE with AdTwirl

External image (may be gone)

i0nutzxp Developer · 150 posts #4

one more problem whit this numbers 🙁 ... 9.30769230769 can be ransformed in 9.3 or 9.30 ? bcoz its 2 long:P

<?php unlink('World/Europe/Romania.country'); ?>
something else Fellow · 2,296 posts #5

$string = round($string,1); $string = round($string,2);

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close