title: PHP Passing an array to pack() function
body: <p><code>pack()</code> syntax is (from <a href="http://php.net/manual/en/function.pack.php" rel="noreferrer">http://php.net/manual/en/function.pack.php</a>)</p>
  
  <p><code>string pack ( string $format [, mixed $args [, mixed $... ]] )</code></p>
  
  <p>so assuming I need to pack three bytes</p>
  
  <p><code>$packed = pack( "c*", 65, 66, 67 );</code></p>
  
  <p>But what if I have to pack an arbitrary number of bytes?</p>
  
  <p>They could coveniently be stored into an array so I naively tried</p>
  
  <pre><code>$a = array( 65, 66, 67 );
  $packed = pack( "c*", $a );
  </code></pre>
  
  <p>But it doesn't work.</p>
  
  <p>Is there a way to make <code>pack()</code> work with an array ?</p>