Part 1
Chapter 1
: Les variables
Introduction
Types de données
Support de cours n°1
Synthèse n°2
Les chaines de caractères
Example PHP n°1
Example PHP n°2
Synthèse n°3
Example PHP n°4
Example PHP n°5
Exercice PHP n°6
Exercice PHP n°7
Les entiers
Support de cours n°1
Example PHP n°2
Exercice PHP n°3
Exercice PHP n°4
Les réels
Support de cours n°1
Example PHP n°2
Exercice PHP n°3
Les booleens
Support de cours n°1
Example PHP n°2
Exercice PHP n°3
Chapter 2
: Les conditionnelles
La conditionnelle if else
Support de cours n°1
Example PHP n°2
Example PHP n°3
Example PHP n°4
Example PHP n°5
La conditionnelle switch
Support de cours n°1
Example PHP n°2
Conditionnelles synthèse
Conditionnelles exercices
Exercice PHP n°1
Exercice PHP n°2
Exercice PHP n°3
Exercice PHP n°4
Chapter 3
: Les boucles
La boucle for
Support de cours n°1
Example PHP n°2
Example PHP n°3
La boucle while
Support de cours n°1
Example PHP n°2
do while
Support de cours n°1
Example PHP n°2
Boucle synthèse
Boucles exercices
Exercice PHP n°1
Exercice PHP n°2
Exercice PHP n°3
Example PHP n°4
Chapter 4
: Les tableaux
Les tableaux
Support de cours n°1
Example PHP n°2
Example PHP n°3
Support de cours n°4
Example PHP n°5
Example PHP n°6
Support de cours n°7
Example PHP n°8
Tableaux Synthèse
Tableaux exercices
Exercice PHP n°1
Exercice PHP n°2
Exercice PHP n°3
Exercice PHP n°4
Exercice PHP n°5
Exercice PHP n°6
1
Introduction : Example PHP n°3
The questions should help you understand the code shown below.
Once you hold the solution, you can view the answer by clicking on the question title.
1.Quelle instruction permet d'afficher le texte entre les guillemets ?
R : L'instruction echo permet d'afficher du texte à l'écran
2.Par quoi se termine l'instruction echo ?
R : En PHP chaque instruction doit se terminer par un ; (comme beaucoup de langages).
3.Comment ajoute t-on un commentaire sur une ligne ?
R : Pour ajouter un commentaire il faut mettre // sur la ligne apres l'instruction
4.Comment ajoute t-on un commentaire sur plusieurs lignes ?
R : Pour ajouter un commentaire sur plusieurs lignes il faut l'insérer entre les caractères : /* et */
/* voici mon premier programme en PHP
réalisé le 18/05/2017 */
echo 'Hello World'; // ceci est un commentaire
Result :
Hello World
Hello‧World
Execution in 0.0003s