tommy445 Posted March 9, 2009 Share Posted March 9, 2009 hello, this string works great for placing decimals but how to get commas into this string? <?php print ("%01.2f, $client_primary_job) ?> Link to comment https://forums.phpfreaks.com/topic/148556-solved-formatting-commas/ Share on other sites More sharing options...
Philip Posted March 9, 2009 Share Posted March 9, 2009 number_format() Link to comment https://forums.phpfreaks.com/topic/148556-solved-formatting-commas/#findComment-780091 Share on other sites More sharing options...
Maq Posted March 9, 2009 Share Posted March 9, 2009 Try: $number = 1000; echo number_format($number, 2); ?> Link to comment https://forums.phpfreaks.com/topic/148556-solved-formatting-commas/#findComment-780096 Share on other sites More sharing options...
tommy445 Posted March 9, 2009 Author Share Posted March 9, 2009 thanks a mil, I just had to learn how to apply it. Link to comment https://forums.phpfreaks.com/topic/148556-solved-formatting-commas/#findComment-780405 Share on other sites More sharing options...
Maq Posted March 9, 2009 Share Posted March 9, 2009 thanks a mil, I just had to learn how to apply it. Just replace $number with $client_primary_job... Link to comment https://forums.phpfreaks.com/topic/148556-solved-formatting-commas/#findComment-780419 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.