$Copies_of_print = 3; $item_cost = 0.0; $item_cost = 6.5; $line_total = $Copies_of_print * $item_cost; print($line_total); gives 0, instead of 19.5 do i need to type cast? Thanks!
Hello, I copied the code you posted and it worked. <?php $Copies_of_print = 3; $item_cost = 0.0; $item_cost = 6.5; $line_total = $Copies_of_print * $item_cost; print($line_total); ?> Code (markup): shows 19.5. I tired it in PHP 4 and PHP 5
i also tried this code and it shows 19.5. there is no reason of showing 0 you assigned 6.5 to $item_cost last so it does not have the value 0