Ajout du cours sur les opérateurs logiques et de comparaisons + petites modification
This commit is contained in:
22
Chapter_1/Practice/php/variables.php
Normal file
22
Chapter_1/Practice/php/variables.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
// Vous trouverez ici, des exemples sur les variables
|
||||
|
||||
$str = "my string";
|
||||
$float = 1.97;
|
||||
$int = 4;
|
||||
$bool = true;
|
||||
$arr =[1, 2, 3];
|
||||
|
||||
echo $str; // Renvoi my string
|
||||
echo $float; // Renvoi 1.97
|
||||
echo $int; // Renvoi 4
|
||||
echo $bool; // Renvoi true ou 1
|
||||
echo $arr; // Renvoi [1, 2, 3]
|
||||
|
||||
|
||||
// Essayons de réutiliser un nom de variables
|
||||
|
||||
$str = "new string";
|
||||
|
||||
echo $str; // Renvoi new string
|
||||
?>
|
Reference in New Issue
Block a user