title: PHP Notice: Array to string conversion Error
body: <p>Been experiencing this error for a little while and can't find any conclusive answers on fixing it. I have tried removing quotes from <code>$key</code> in line 59 but to no avail.</p>
  
  <pre><code>if (!get_magic_quotes_gpc()) {
      if (isset($_POST)) {
          foreach ($_POST as $key =&gt; $value) {
              $_POST['$key'] =  trim(addslashes($value));
          }
      }
  
      if (isset($_GET)) {
          foreach ($_GET as $key =&gt; $value) {
              $_GET[$key] = trim(addslashes($value));
          }
      }   
  }
  </code></pre>
  
  <p><strong>LINE 59</strong></p>
  
  <pre><code>$_POST['$key'] =  trim(addslashes($value));
  </code></pre>
  
  <p><strong>Error On Screen</strong></p>
  
  <blockquote>
    <p>Notice: Array to string conversion in
    C:\Inetpub\vhosts\domain.com\httpdocs\library\config.php on
    line 59</p>
  </blockquote>