chinwan Posted July 26, 2009 Share Posted July 26, 2009 I have the following line: $tags[] = $this->MakeXMLTag('creditcardpercent', $paymentDetails['creditcardpercent'], true); The way the number is stored in $paymentDetails['creditcardpercent'] is ".10" with a decimal point. I want it that when it pulls in the data to the xml tag, it will strip the decimal point. Any suggestions? Thank You Link to comment https://forums.phpfreaks.com/topic/167520-solved-when-making-xmltag-how-to-strip-away-a-decimal-point-from-the-data/ Share on other sites More sharing options...
ignace Posted July 26, 2009 Share Posted July 26, 2009 $paymentDetails['creditcardpercent'] = str_replace('.', '', $paymentDetails['creditcardpercent']); Link to comment https://forums.phpfreaks.com/topic/167520-solved-when-making-xmltag-how-to-strip-away-a-decimal-point-from-the-data/#findComment-883395 Share on other sites More sharing options...
chinwan Posted July 26, 2009 Author Share Posted July 26, 2009 Thanks it worked. Link to comment https://forums.phpfreaks.com/topic/167520-solved-when-making-xmltag-how-to-strip-away-a-decimal-point-from-the-data/#findComment-883397 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.