title: mysqli_real_escape_string Not working inside array_map
body: <p>I have a function to making a insert query, But if i use <code>mysqli_real_escape_string</code> its not response with the values. This is the problem inside the array map so i can't figure out how to solve this.</p>
  
  <blockquote>
    <p>Server version: 5.6.24 - MySQL Community Server (GPL)</p>
  </blockquote>
  
  <p><strong>My function is:</strong></p>
  
  <pre><code>function insertQryStr($array, $table){
      $insertUrl = "insert into %s(%s) values('%s')";
      $insertQryStr = sprintf($insertUrl, $table, implode(', ',@array_map('mysql_real_escape_string', @array_keys($array))), implode("', '",  @array_map('mysql_escape_string', $array)));
      return $insertQryStr;
  }
  </code></pre>