Jump to content

Shopping Cart Problem


dragonusthei

Recommended Posts

i'm not too good with the math side of php (at all) but you could probably just check it.

list($dollar, $cents) = explode('.', $price); // splits price from dollars and cents
if(strlen($cents) == '1'){
  $cents .= '0';
}

something like that would work.. i'm sure theres a more simple way with the math part of php but again, i'm not good with it.
Link to comment
https://forums.phpfreaks.com/topic/23022-shopping-cart-problem/#findComment-103966
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.