title: PHP passing array to PDO bindParam
body: <p>PDO param:</p>
  
  <pre><code>$cto=new PDO("mysql:host=$servername;dbname=$dbname",$username,$password);
  </code></pre>
  
  <p>Interacting with data base</p>
  
  <pre><code>$csql=$cto-&gt;prepare("INSERT INTO `users`(`username`, `password`, `class`, `is_on`, `time_log`, `IP`)
          VALUES (:name,:pass,:class,0,0,'0')");
          $pr=[
            ':name' =&gt; $_POST['username'],
            ":pass" =&gt; $_POST['password'],
            ":class" =&gt; $_POST["class"],
          ];
          $csql-&gt;execute($pr);
          $cto=null;
  </code></pre>
  
  <p>My question is ,i am currently using array $pr in execute,could i pass this array with using bindParam</p>
  
  <pre><code>$csql-&gt;bindParam($pr);
  $csql-&gt;exec();
  </code></pre>
  
  <p>Thank you for your time.</p>