Use of undefined constant
<p>HI i have a piece of code that i have been using on my server for some time but now suddenly it is giving this error:</p>

<blockquote>
  <p>Use of undefined constant country - assumed 'country'</p>
</blockquote>

<p>I have read several previous posts, but everytime i try and apply these changes to my code it makes no difference and so i am lost.  the error points to this item here</p>

<pre><code>'{$ip[country]}'
</code></pre>

<p>Any suggestions would be appreciated, i have read about adding quotes but when i apply them to this it makes no difference.</p>

<p>this is my insert query, if i take this variable out it works.</p>

<pre><code> INSERT INTO ip_stats (ip, time, hostname, page, referer, string, agent, member,   server_name, company_name, company_address) VALUES ('$ip', '$time', '$hostname', '$page1','$request_uri', '$query_string', '$http_user_agent', '$member', '$server_name', '$netname, '{$ip[$country]}')
</code></pre>

<p>and this is where i generate the variable </p>

<pre><code>  $country = implode( ", ", (array) $ip['country'] );
</code></pre>
