Ajout des exemple en code php
This commit is contained in:
parent
7f1cc4c735
commit
5c48b86493
@ -10,7 +10,7 @@ var arr = [1, 2, 3];
|
||||
console.log(str); // Renvoi my string
|
||||
console.log(float); // Renvoi 1.64
|
||||
console.log(int); // Renvoi 4
|
||||
console.log(bool); // Renvoi true
|
||||
console.log(bool); // Renvoi true ou 1
|
||||
console.log(arr); // Renvoi [1, 2, 3]
|
||||
|
||||
|
||||
|
@ -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
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user