how do i write a float number that currently i see on screen

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

Post Reply
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

how do i write a float number that currently i see on screen

Post by pelegk2 »

i havea float value in my database : 1000000
i see it on screen as : 1e+006
how do i do i do so i will see : 1000000
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Got some example code? Seeing 1e+006 is unexpected behaviour :o
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

Post by pelegk2 »

this is all i do :
echo "<td>".$row['once']."</td>";
and the onceis a field of float type
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Sounds like you defined the column type as float with any precision values, Eg float(6,2) .. if you defined it as float with length/values of 6,2 then the number would come back as 1000000.00
Post Reply