Jump to content

unexpected T_RETURN


graham23s

Recommended Posts

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

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.