gvp16 Posted April 18, 2008 Share Posted April 18, 2008 say i have a number which is the result of a basic calculation for a shopping baskets e.g. 8.30 how could i format, or display this as 830? i need to link to a payment page, on which the amount being sent must be in pennies. Thanks. gvp16. Link to comment https://forums.phpfreaks.com/topic/101738-solved-how-can-i-go-about-doing-this/ Share on other sites More sharing options...
haku Posted April 18, 2008 Share Posted April 18, 2008 I believe you can do it like this: intval(8.30 * 100) Link to comment https://forums.phpfreaks.com/topic/101738-solved-how-can-i-go-about-doing-this/#findComment-520531 Share on other sites More sharing options...
gvp16 Posted April 18, 2008 Author Share Posted April 18, 2008 works great, thanks alot. Link to comment https://forums.phpfreaks.com/topic/101738-solved-how-can-i-go-about-doing-this/#findComment-520548 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.