22 lines
445 B
PHP
22 lines
445 B
PHP
<?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
|
|
?>
|