Fatal error: Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, string given in G:PleskVhosts [duplicate]

Actually I am submitting a HTML form and when i filled the details and then click submit Two warnings appeared and one Fatal error (HTTP 500).

Warning: Undefined array key “country” in G:PleskVhosts…submit.php on line 30
Warning: Undefined array key “My_Vertical” in G:PleskVhosts…submit.php on line 36

Fatal error: Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, string given in G:PleskVhosts…submit.php:37 Stack trace: #0 G:PleskVhosts…submit.php(37):implode()#1{main} thrown in G:PleskVhosts…submit.php on line 37

I am putting these statements in my code:-

$title = $_POST['titlea'];
$first_name = $_POST['first_name'];
$surname = $_POST['surname'];
$designation = $_POST['designation'];
$company_name = $_POST['company_name'];
$add1 = $_POST['add1'];
$add2 = $_POST['add2'];
$add3 = $_POST['add3'];
$city = $_POST['city'];
$state = $_POST['state'];
$pin = $_POST['pin'];
$country = $_POST['country'];  **//Line 30**
$telephone = $_POST['telephone'];
$fax = $_POST['fax'];
$mobile = $_POST['mobile'];
$email = $_POST['email'];
$website = $_POST['website'];
$My_Vertical = $_POST['My_Vertical'];    **//Line 36**
$Verticals = implode(",",$_POST["Vertical"]);    **//Line 37**
$Other_Vertical = $_POST['Vertical_others'];
$Information = implode(",",$_POST["Information"]);
$Other_Information = $_POST['others'];
$Objective = implode(",",$_POST["Objective"]);
$Other_Objective = $_POST['otherObjective'];

I am expecting that after submitting this form data should be updated in phpmyadmin database.