lebedev9114 Posted October 16, 2009 Share Posted October 16, 2009 Hey guys I am in process of learning and creating my first real project online, and i need some help with the follwowing: while ($row = mysql_fetch_assoc($Result)) { ?> <tr> <th><?php echo $row['de'] ?></th> <th><?php echo $row['ru'] ?></th> <th><a href="getlink.php?id=<?php echo $row['id']; ?>">More Info</a></th> <th><?php echo $row['nl'] ?></th> I want to number_format() 'de', 'ru' , which are integers in the database, how do i do this inside or outside of the while statement? any help would be really appreciated ! Quote Link to comment Share on other sites More sharing options...
Mark Baker Posted October 16, 2009 Share Posted October 16, 2009 <th><?php echo number_format($row['de'],0,'.',','); ?></th> Quote Link to comment Share on other sites More sharing options...
mrMarcus Posted October 16, 2009 Share Posted October 16, 2009 when you tried it, what was the result? don't you get that urge to just try things out? i know i do. it's either gonna give you an error, or the correct result. and yes, you can put it inside the loop, but did you really need somebody to tell you that? Quote Link to comment Share on other sites More sharing options...
lebedev9114 Posted October 16, 2009 Author Share Posted October 16, 2009 Thank you very much that worked ! I tried playing around with it several times, but i kept getting '1' as a result instead of 3,000,000 , and no errors so i didnt know what i was doign wrong ! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.