Why do I get "base table or view not found" when trying to use sprintf? : <pre><code>$sql = sprintf(
    'insert into $s ($s) values ($s)',
    $table,
    implode(', ', array_keys($parameters)),
    ':' . implode(', :', array_keys($parameters))
);
try {
    $statement = $this-&gt;pdo-&gt;prepare($sql);
    $statement-&gt;execute($parameters);
} catch (Exception $e) {
    die($e-&gt;getMessage());
}
</code></pre>

<p>OTHER FILE:</p>

<pre><code>$query-&gt;test('todos', [
    'description' =&gt; $_POST['name'] . ' ' . $_POST['lastName'],
    'completed' =&gt; isset($_POST['finished'])
]);
</code></pre>

<p>It's weird cause if I do it manually instead it works perfectly</p>

<pre><code> $sql = "insert into $table (description, completed) values (:description, :completed)";
</code></pre>

<p>But when I use sprintf and implode it gives me an error saying "base table or view not found" Any ideas why?</p>
