title: Undefined Variable? But I defined it
body: <p>Well before anyone claims that theres a duplicate question... (I've noticed that people who can't answer the question tend to run and look for a duplicate, and then report it.)</p>
  
  <p>Here is the duplicate you are looking for:
  <a href="https://stackoverflow.com/questions/2481382/php-claims-my-defined-variable-is-undefined">php claims my defined variable is undefined</a></p>
  
  <p>However, this isn't quite a duplicate. It gives me a solution, but I'm not really looking for this particular solution.</p>
  
  <p>Here is my problem:</p>
  
  <p><code>
  Notice: Undefined variable: custom</code></p>
  
  <p>Now here is my code:</p>
  
  <pre><code>                $headers = apache_request_headers(); // Request the visitor's headers.
                  $customheader = "Header: 7ddb6ffab28bb675215a7d6e31cfc759"; //This is what the header should be.
                          foreach ($headers as $header =&gt; $value) { 
                                  $custom .= "$header: $value"; 
  }
  </code></pre>
  
  <p>Clearly, $custom is defined. According to the other question, it's a global and should be marked as one. But how is it a global? And how can I make it a (non-global)? The script works fine, it still displays what its supposed to and acts correctly, but when I turn on error messages, it simply outputs that notice as well. I suppose its not currently <em>necessary</em> to fix it, but I'd like to anyway, as well as know why its doing this.</p>