Question : Show floating point decimal place even for whole numbers in php

Hi,

I have a problem to do with the decimal place for some numbers:

1:
2:
3:
4:
5:
6:
7:
$start = 25.00;
$start = 25.00 - 0.001; # so $start is now 24.999

$start += 0.001;

print $start; #gives 25 but i want 25.00


How can this be achieved?

Thanks,

Julian

Answer : Show floating point decimal place even for whole numbers in php

Hi,

One of these should help you out for what you are looking for

a:link {
text-decoration:none;
border-bottom:1px solid black;
}
a:visited {
border-bottom:1px solid grey;
}
a:hover {
border-bottom:1px solid red;
}

Or;

<html
 <head>
  <style>
   a:hover{color:#f00;}
   a{text-decoration:underline;}
   span.link{color:#000;}
  </style>
 </head>
 <body>
  <a href="#"><span class=link>Click Me</span></a>
 </body>
</html>

M@
Random Solutions  
 
programming4us programming4us