Bonjour,

Voila mon code :

<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<!--commentaire html-->
<?php

echo "Hello World"; // echo ou print; des “ ou ‘; un point ; à la fin attention !
//commentaire php

?>

</body>
</html>

J'aimerais créer deux variables une a 2 et l'autre a 4 ,si vous pouviez m'expliquer et m'aider sa serais cool merci
Niveau : Extremement Novice

2 réponses


Baw0u
Réponse acceptée
<?php
    $two = 2;
    $four = 4;

    echo $two; //Affiche 2
    echo $four; //Affiche 4

    echo $two+$four; //Affiche 6 
?>

Bonjour

Pourrais-tu être plus précis

J'aimerais créer deux variables une a 2 et l'autre a 4