graham23s Posted October 25, 2008 Share Posted October 25, 2008 Hi Guys my function: <?php function calculate_weight_and_postage($customers_country, $sum_weight) { // the 2 arguments we are taking are the customers country and the sum weight of the order // UK if ($customers_country == "United Kingdom") { // sub if if ($sum_weight > 0.10) { $weightPostage = array("1.50" => "Standard - £1.50 incl VAT") // return us the weight and postage to use return $weightPostage; } } } ?> is giving back the error unexpected T_RETURN not to sure why it looks ok though. thanks for any help guys Graham Link to comment https://forums.phpfreaks.com/topic/130061-unexpected-t_return/ Share on other sites More sharing options...
JavaNinja Posted October 25, 2008 Share Posted October 25, 2008 You are missing a ";" after the line: $weightPostage = array("1.50" => "Standard - £1.50 incl VAT") Link to comment https://forums.phpfreaks.com/topic/130061-unexpected-t_return/#findComment-674356 Share on other sites More sharing options...
graham23s Posted October 25, 2008 Author Share Posted October 25, 2008 ahhh thanks mate what a novice mistake lol Link to comment https://forums.phpfreaks.com/topic/130061-unexpected-t_return/#findComment-674358 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.