Jump to content

Archived

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

dragonusthei

Shopping Cart Problem

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.

Share this post


Link to post
Share on other sites

×

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.