BillyMako Posted February 19, 2009 Share Posted February 19, 2009 Help!!! I need to add these 2 variables together. $t8 = ($currencies->format($cart->show_total())); $t9 = $shipping; how can i add these totals together? It wont work if i do $t8 = ($t8 + $t9); How can i add them together? Link to comment https://forums.phpfreaks.com/topic/145865-solved-need-help-doing-simple-adding-of-these-variables/ Share on other sites More sharing options...
corbin Posted February 19, 2009 Share Posted February 19, 2009 $x = 3; $y = 5; $z = $x + $y; echo $z; Link to comment https://forums.phpfreaks.com/topic/145865-solved-need-help-doing-simple-adding-of-these-variables/#findComment-765827 Share on other sites More sharing options...
BillyMako Posted February 19, 2009 Author Share Posted February 19, 2009 that wont work Link to comment https://forums.phpfreaks.com/topic/145865-solved-need-help-doing-simple-adding-of-these-variables/#findComment-765831 Share on other sites More sharing options...
MasterACE14 Posted February 19, 2009 Share Posted February 19, 2009 are you getting any errors? add before your script.... error_reporting(E_ALL); Link to comment https://forums.phpfreaks.com/topic/145865-solved-need-help-doing-simple-adding-of-these-variables/#findComment-765832 Share on other sites More sharing options...
BillyMako Posted February 19, 2009 Author Share Posted February 19, 2009 Worked it out, just removed this section - $currencies->format It was interfering with the total. Link to comment https://forums.phpfreaks.com/topic/145865-solved-need-help-doing-simple-adding-of-these-variables/#findComment-765843 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.