I have an array like this
$array = array('Autobus', 'Ecole', 'Hopital' ...);
And this is how I echo images that are in that array
foreach ($array as $prox){
if ($prox == 'Autobus'){
echo '<img src="./imgs/icones/autobus.png" width="35" height="35" alt="'.$prox.'" title="'.$prox.'"/>';
}
if ($prox == 'Ecole'){
echo '<img src="./imgs/icones/ecole.png" width="35" height="35" alt="'.$prox.'" title="'.$prox.'"/>';
}
if ($prox == 'Hopital'){
echo '<img src="./imgs/icones/hopital.png" width="35" height="35" alt="'.$prox.'" title="'.$prox.'"/>';
}
...
Is there any way shorter than that code to do the same thing ?
Thanks