= 900 && intval(date('Hi',$now)) <= 1700) { $_RATES[] = array( "service_name" => "It is currently betwen 9AM-5PM", //this is what the customer will see "service_code" => "It is currently betwen 9AM-5PM", //can be anything you like "total_price" => 0, //in cents "currency" => "GBP", ); } //show rates between 9AM and 5PM local time, weekdays only if (intval(date('Hi',$now)) >= 900 && intval(date('Hi',$now)) <= 1700 && date('N') <= 5) { $_RATES[] = array( "service_name" => "It is currently betwen 9AM-5PM, Mon-Fri", //this is what the customer will see "service_code" => "It is currently betwen 9AM-5PM, Mon-Fri", //can be anything you like "total_price" => 0, //in cents "currency" => "GBP", ); } //show rates between 9AM monday and 5PM friday local time if ((date('N') == 1 && intval(date('Hi',$now)) >= 900) || (date('N') >= 2 && date('N') <= 4) || (date('N') == 5 && intval(date('Hi',$now)) <= 1700)) { $_RATES[] = array( "service_name" => "It is currently betwen 9AM Mon - 5PM Fri", //this is what the customer will see "service_code" => "It is currently betwen 9AM Mon - 5PM Fri", //can be anything you like "total_price" => 0, //in cents "currency" => "GBP", ); } return $_RATES; /* do not edit below this line */ }