Jump to content

Country flag


gio1961

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
Link to comment
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
Link to comment
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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...