How to add a PHP array in a mysql table?

```
try {
    // set the PDO error mode to exception
    $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    // Prepare the statement so that it gets repeated
    $sql = $conn->prepare("INSERT INTO tasks (taskdescription) VALUE ('$task')");

    //For each task in our list pass it into the query to be executed
    foreach ($list as $task) {
        $sql->execute($task);
    }

    echo "Tasks inserted into task table successfully";
}
catch(PDOException $e)
{
    echo $sql . "<br>" . $e->getMessage();
}

```

I would like to do this in [PDOPHP](http://php.net/manual/en/book.pdo.php) so that it matches the rest of my code. At the moment it says it has inserted the tasks but when i check on phpmyadmin it appears empty...