Parse error: syntax error, unexpected ';', expecting ',' or ')' in /home/u459249666/public_html/ss/search.php on line 19
$confiq = array(
    'host' => 'localhost',
    'username' => 'root',
    'password' => '',
    'dbname' => 'hunklessons',
);
$db = new PDO('mysql:host='.$confiq['host'].';dbname='.$confiq['dbname'],$confiq['username'],$confiq['password'].'');
if(isset($_GET['s']) && !empty($_GET['s'])) {
    //secure the search input
    $search = trim(strip_tags($_GET['s']));
    //convert the space in the search to sepreate terms
    $search_terms = explode(" ", $search);
    $term_count = 0;
    $q = "";
    $result = array();
    $i = 0;
    foreach ($search_terms as $term) {
        $term_count++;
        if($term_count === 1) {
            $q .= "`title` LIKE '%$term%' "; 
        } else {
            $q .= "AND `title` LIKE '%$term%' ";
        }
    }
    //prepare the mysql query in PDO
    $query = $db->query("SELECT * FROM `google_search` WHERE $q");
    //get the number of the results found
    $num = $query->rowCount();
    if ($num > 0) {
        //fetch the result
        while($row = $query->fetch(PDO::FETCH_ASSOC)){
            //put the results in the array
            $result[$i] =  array(
                'title' => $row['title'],
                'desc' => $row['description'],
                'link' => $row['link']
            );
            $i++;
        }
    }
    //convert result array into json format
    $json_result = json_encode($result);
    echo $json_result;
}
On Running this script I'm getting
parse error in line 19
but I am not able to understand what the error is how can it be corrected.
I tried a lot. Since I m beginner it is very confusing sometimes. Please help me out
 
     
     
    