-2

hello i have this code

function sm($user_id,$message,$token) {
    $url = 'https://api.telegram.org/bot'.$token.'/sendMessage?chat_id='.$user_id.'&text='.$message;
    $update = file_get_contents($url);
}

it error is Parse error: syntax error, unexpected 'function' (T_FUNCTION)

what is wrong?? thanks all

pavel
  • 25,361
  • 10
  • 41
  • 58

1 Answers1

0

You didn't end previous line, check if there have ;.

If it didn't works, provide more code.

Sean
  • 6,740
  • 1
  • 14
  • 36