I have been writing this code below with the help of everyone on here and about 3 php tutorials. When I run the code I am getting a syntax error for line 70(the second to last curly bracket}). It says that the bracket is unexpected, but I can't figie out why...
<?php
//defining function
function splitOne($V){
    //split array into smaller arrays
    array_chunk($data, 1);
    print_r($data);
    //map thumb part of array
    $thumb = array_map(str_getcsv($data[5], ";"));
    print_r($thumb);
    //map keyword part of array
    $keyword = array_map(str_getcsv($data[6], ";"));
    print_r($keyword);
    //remove last two fields of data
    array_pop($data);
    array_pop($data);
    //merge arrays 
    $v = array_merge($data, $thumb, $keyword);
    //return new array from function
    return $v;
}
//Connecting to database
$mysqli = new mysqli("localhost", "root", "password", 
"Studios");
//field Check
print_r("Connection Established");
//Scanning Directory
$dollar = glob("C:\Users\user\Desktop\CVS\XH\*.CSV");
//field Check
print_r("Data Collected" + $dollar);
foreach($dollar as $value) {
    while (($data = fgetcsv($dollar, 1002, "|")) !== FALSE){
        //remove first field
        $fruit = array_shift($data);
        print_r($data);
        //remove last string
        array_pop($data);
        print_r($data);
        //remove last string again
        array_pop($data);
        print_r($data);
        //remove last string a third time
        array_pop($data);
        print_r($data);
        //mapping array into function to manipulate
        array_map(splitOne, $data);
        $query = "INSERT INTO Quarantine (Url, 
EmbedUrl, Title, Duration, DateAdded, Thumb1, Thumb2, 
Thumb3, Thumb4, Thumb5, Thumb6, Thumb7, Thumb8, 
Thumb9, Thumb10, Keyword1, Keyword2, Keyword3, 
Keyword4, Keyword5, Keyword6, Keyword7, Keyword8, 
Keyword9, Keyword10) VALUES($V)";
        mysqli_query($conn, $query);
        //Field Check
        print_r("Data Entered Into Quarantine")
    }
}
?>
I am running a local wamp server on windows 7.
 
     
     
    