Salut
Je dois être épuisé, mais pourriez-vous m’expliquer ça:
[code]<?php
$login = $_GET[‘login’];
?>
"; echo "test swith :"; switch($login) { case "yann": echo "yann"; break; case "lolotte": echo "lolotte"; break; } echo "
"; echo "test if :"; if ($login == "yann") {echo "yann";} if ($login == "lolotte") {echo "lolotte";} ?> [/code]
Et à l’affichage:
avec $login= lolotte
lolotte
test swith :
test if :
ou avec $login=yann
yann
test swith :
test if :
Pourquoi les conditions switch et if déconnent ( il devrait afficher test switch yann …)??