How to escape a string which contains signs such as ’ or " etc. In array?
<p>Here is my function that i created for escape strings...</p>

<p>function clean_array($value)</p>

<p>{</p>

<pre><code>      foreach($value as $key =&gt; $val)

    {
    if(get_magic_quotes_gpc())
        {
        $value[$key]=stripslashes($val);
        }
    $value[$key]= mysql_real_escape_string($val);
    $value[$key]=htmlentities($val);
    $value[$key]=htmlspecialchars($val);
    }

return $value;
unset($val);
</code></pre>

<p>}</p>

<p>Please explain step by step bcoz i am beginner in PHP.I am very grateful to u if you give solution...</p>
