Function that inserts values for an array of fields into a database table
There's a couple of issues with it, for start your nested if blocks are unnecessary: instead of manually checking and returning true or false, just return the result of those methods, like so:

return $this-&gt;_pdo-&gt;prepare($sql) and $this-&gt;_pdo-&gt;exec($sql);


Additionally, you have made $fields and $values into optional parameters by making them auto-initialise to empty arrays, however you cannot have an INSERT INTO statement without specifying at least one field and value, therefore instead of making them optional array parameters, you should use type hinting to ensure they are arrays, and then check to make sure that the arguments are correct before you send the query off to the server, something like this:

public function insert($table, array $fields, array $values) {

    $numFields = count($fields);
    $numValues = count($values);

    if($numFields === 0 or $numValues === 0)
        throw new Exception("At least one field and value is required.");
    if($numFields !== $numValues)
        throw new Exception("Mismatched number of field and value arguments.");

    $fields = '`' . implode('`,`', $fields) . '`';
    $values = "'" . implode("','", $values) . "'";
    $sql = "INSERT INTO {$table} ($fields) VALUES($values)";

    return $this-&gt;_pdo-&gt;prepare($sql) and $this-&gt;_pdo-&gt;exec($sql);
}