Jump to content
gio1961

Country flag

Recommended Posts

Hi guys, I have this code but the flag is not displayed.
Any help is welcome. Thank you

<?php
$country = OperationsData::getAirportInfo($route->depicao);
$imgicao = array_search($country->country, Countries::$countries);
?>
<img src="<?php echo SITE_URL;?>/lib/images/countries/<?php echo strtolower($imgicao);?>.png" alt="<?php echo strtolower($imgicao);?>" />
<a href="<?php echo SITE_URL?>/index.php/airports/get_airport?icao=<?php echo $route->depicao ?>" target="_blank"><?php echo $route->depicao;?></a> (<?php echo $route->deptime; ?>)
 </strong>

 

example image

AA.jpg

Edited by gio1961

Share this post


Link to post
Share on other sites

Do you have the country image files located in the lib folder? 

Try to test it, open the image on a new tab maybe. If the images don't exist, download the original copy of phpVMS, it'll have the images  If the image exists and is not loading, then there is some other issue. 

 

Regards

Share this post


Link to post
Share on other sites
57 minutes ago, LeonardIGO4036 said:

Do you have the country image files located in the lib folder? 

Try to test it, open the image on a new tab maybe. If the images don't exist, download the original copy of phpVMS, it'll have the images  If the image exists and is not loading, then there is some other issue. 

 

Regards 

Thank you for answering .The images are there, otherwise you will not see them on the other pages of my test site.

Edited by gio1961

Share this post


Link to post
Share on other sites

thanks to Vangelis resolve:

<?php
$country = OperationsData::getAirportInfo($route->depicao);

?>

<img src="<?php echo SITE_URL;?>/lib/images/countries/<?php echo strtolower ($country->country);?>.png" width="24" />

 

flag.jpg

Edited by gio1961

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×