Afficher la balise image formatée

Author:


Download

<?php

function imageHTML($fichier, $alt = '', $height = 0, $width = 0) {

    print '<img src="' . $GLOBALS['cheminFichier'] . $fichier . '"';
    if (strlen($alt)) {
        print ' alt="' . $alt . '"';
    }
    if ($height) {
        print ' height="' . $height . '"';
    }
    if ($width) {
        print ' width="' . $width . '"';
    }
    print '>';
}

         ?>

Leave a Reply

Your email address will not be published. Required fields are marked *


9 × = sixty three