Flags not displaying using PHP
<p>I am trying to display a country flag based on the user's IP address. Previously, I had it working fine, but I think I accidentally did something wrong. After hours of debugging, I can't seem to find what's causing the error. It's not throwing any errors, but its simply not displaying any flags or any of the 'echo' statements. Does anyone have any advice? The code is below, thanks in advance. </p>

<pre><code>function iptocountry($ip) {  
   $numbers = preg_split( "/\./", $ip);  
   include("ip_files/".$numbers[0].".php");  
   $code=($numbers[0] * 16777216) + ($numbers[1] * 65536) + ($numbers[2] * 256) + ($numbers[3]);  
   foreach($ranges as $key =&gt; $value){  
      if($key&lt;=$code){  
         if($ranges[$key][0]&gt;=$code){$two_letter_country_code=$ranges[$key][1];break;}  
        }  
}  
if ($two_letter_country_code==""){$two_letter_country_code="unknown";}  
return $two_letter_country_code;  
$IPaddress=$_SERVER['REMOTE_ADDR'];  
$two_letter_country_code=iptocountry($IPaddress);  

include("ip_files/countries.php");  
$three_letter_country_code=$countries[ $two_letter_country_code][0];  
$country_name=$countries[$two_letter_country_code][1];  

echo "Two letters code: $two_letter_country_code&lt;br&gt;";  
echo "Three letters code: $three_letter_country_code&lt;br&gt;";  
echo "Country name: $country_name&lt;br&gt;";  

// To display flag  
$file_to_check="flags/$two_letter_country_code.gif";  
if (file_exists($file_to_check)){  
            echo `"&lt;img src=$file_to_check width=30 height=15&gt;&lt;br&gt;"`;  
            }else{  
            echo `"&lt;img src=flags/noflag.gif width=30 height=15&gt;&lt;br&gt;"`;  
            }  


}  
?&gt;  
</code></pre>
