passing variables for a varible length argument list in php
<p>I wanted to implement my own debug function that has the same signature as sprintf() function which has a variable arg-list:</p>

<pre><code>sprintf('[%s] [%s]', 'textA','textB');  
sprintf('[%s]', 'textC');
</code></pre>

<p>both above will work.</p>

<p>now I want to has a similar debug function that can pass its own arg-list to sprintf():</p>

<pre><code>function debug(A) {
      $msg = sprintf(A);
      ...
}
</code></pre>

<p>anyone can tell me how can I pass A to sprintf if A is variable length argument.?</p>

<p>thanks in advance!</p>
