Flohw,
il y a 14 ans
if (in_array($a, array('e', 'a', 'b', 'c'))
fonction in_array sur la doc php
Bonjour,
Ce n'es pas vraiment un problème, juste histoire que le code soit plus clair.
Je cherche à savoir si il n'existe pas une syntaxe pour remplacer :
if($a == "e" || $a == "a" || $a == "b" || $a == "c"){}
avec quelque chose du genre
if($a == ("e" || "a" || "b" || "c")){}
en sql, il y a
`CHAMP` NOT IN ('C' OR 'M' OR 'F')
Merci et bonne journée.
if (in_array($a, array('e', 'a', 'b', 'c'))
fonction in_array sur la doc php
Yes, merci.