title: Pass all arguments to another function
body: <p>I have two functions like this:</p>
  
  <pre><code>function mysql_safe_query($format) {
      $args = array_slice(func_get_args(),1);
      $args = array_map('mysql_safe_string',$args);
      $query = vsprintf($format,$args);
      $result = mysql_query($query);
      if($result === false) echo '&lt;div class="mysql-error"&gt;',mysql_error(),'&lt;br/&gt;',$query,'&lt;/div&gt;';
      return $result;
  }
  
  function mysql_row_exists() {
      $result = mysql_safe_query(func_get_args());
      return mysql_num_rows($result) &gt; 0;
  }
  </code></pre>
  
  <p>The problem is that the second function won't work because it passes the args to the first one as an array, when it expects them as different parameters. Is there any way to get around this, preferably without modifying <code>mysql_safe_query</code>?</p>