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
Boucles exercices : Exercice PHP n°1
The goal of the exercise is to apply what you have learned using the examples.
Statement
Ecrivez une boucle qui affiche ce qui est demandé :
-
On ecrit 10 fois le numéro de la ligne.Need a clue
Enter your response
$colonnes = 10;
$lignes = 7;
for( /* trou/ */ /* /trou */)
{
for(/* trou/ */ /* /trou */)
{
print(/* trou/ */ /* /trou */);
}
print('<br>');
}
Result to obtain
0000000000
1111111111
2222222222
3333333333
4444444444
5555555555
6666666666
1111111111
2222222222
3333333333
4444444444
5555555555
6666666666
0000000000<br>1111111111<br>2222222222<br>3333333333<br>4444444444<br>5555555555<br>6666666666<br>
Execution in 0.0005s