title: Can PHP PDO Statements accept the table or column name as parameter?
body: <p>Why can't I pass the table name to a prepared PDO statement?</p>
  
  <pre><code>$stmt = $dbh-&gt;prepare('SELECT * FROM :table WHERE 1');
  if ($stmt-&gt;execute(array(':table' =&gt; 'users'))) {
      var_dump($stmt-&gt;fetchAll());
  }
  </code></pre>
  
  <p>Is there another safe way to insert a table name into a SQL query? With safe, I mean that I don't want to do</p>
  
  <pre><code>$sql = "SELECT * FROM $table WHERE 1"
  </code></pre>