|
Ecrire un texte : On
utilise soit la fonction print(""); ou soit echo ""; :
|
print("Voici mon texte !!!"); // Ceci affichera voici mon texte !!! echo "Voici mon texte";
// Ceci affichera voici mon texte
!!! |
Un autre exemple, mais cette
fois avec du code html :
|
echo "Bonjour !<br><u>Voici
ci-dessous un tableau</u> :<br><table
border=\"1\"><tr><td width=\"156\"
height=\"24\"><p>Contenu du
tableau</p></td></tr></table>"; |
Le code ci-dessus affichera
donc :
Bonjour ! Voici ci-dessous un tableau :
Afficher une image : >
Le code ci-dessous affichera une image au format 32x32 pixels ...
:
|
echo "<img
src=\"http://www.mon_site.com/mon_image.gif\" width=\"32\"
height=\"32\" border=\"0\" alt=\"Valeur
alt\">"; |
Cours écrit par Aurélien
Ceugnart
Ajouter un commentaire
[0]
Retour
aux cours PHP
|