1414mark1414 Posted July 28, 2007 Share Posted July 28, 2007 let's say I have$tt = t$-200,000;the $t is = to 6,000,000but with this code I cant add , it will show errorso I can only do this$tt = t$-200000;how can I add a , to the number 200000???? Link to comment Share on other sites More sharing options...
Synook Posted July 28, 2007 Share Posted July 28, 2007 Why in the world would you want to???But if you really want to, you will need to remove it before operating: function rmvcommas($number) { $number = str_replace(",","",$number); return $number;}$tt = $t - rmvcommas("200,000"); However, in programming you should really try to forget about commas. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.