title: PDO bindParam issue
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/182287/can-php-pdo-statements-accept-the-table-name-as-parameter">Can PHP PDO Statements accept the table name as parameter?</a>  </p>
  </blockquote>
  
  
  
  <p>I have a function in my class which is doing some trouble. Here the function</p>
  
  <pre><code>function insert($table,$column = array(),$value = array())
  {
      $array1 = implode(",", $column);
      $array2 = implode(",", $value);
  
      try 
      { 
          $sql = $this-&gt;connect-&gt;prepare("INSERT INTO :table (:date1) VALUES (:date2)");  
          $sql-&gt;bindParam(':table',$table, PDO::PARAM_STR);
          $sql-&gt;bindParam(':data1',$array1, PDO::PARAM_STR);
          $sql-&gt;bindParam(':data2',$array2, PDO::PARAM_STR);
  
          $sql-&gt;execute();
  
      }  
      catch(PDOException $e) 
      {  
          echo $e-&gt;getMessage();  
      }  
  }
  </code></pre>
  
  <p>I call the function with:</p>
  
  <pre><code>-&gt; insert('coupons',array('categorie','name','link','code','id'),array('test11','test','test','test','NULL'));
  </code></pre>
  
  <p>The error I get is :</p>
  
  <blockquote>
    <p>Warning: PDOStatement::execute() [pdostatement.execute]: SQLSTATE[HY093]: Invalid parameter number: parameter was not defined in C:\xampp\htdocs\MYFRAMEWORK\lib\database.class.php on line 46</p>
  </blockquote>
  
  <p>Line 46 is : </p>
  
  <pre><code>$sql-&gt;execute();
  </code></pre>
  
  <p>So now I don't really see where the issue is. Any pointers?</p>