mysql_real_escape_string() expects parameter 1 to be string,
<p>I have used <code>mysql_real_escape_string</code> but it will give following error:</p>

<blockquote>
  <p>warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /Applications/XAMPP/xamppfiles/htdocs/example/infostud.php on line 16
  line 16</p>
</blockquote>

<pre><code>$department=mysql_real_escape_string(['department']);
</code></pre>